-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwalls.py
More file actions
30 lines (25 loc) · 837 Bytes
/
Copy pathwalls.py
File metadata and controls
30 lines (25 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from gameObject import GameObject
class Walls(GameObject):
def __init__(self, gamesize):
location = self.generateWalls(gamesize)
super().__init__(location, objecttype=2)
self.length: int = gamesize
def getLocation(self):
location = self.location
return location
def getWallSize(self):
wallsize = self.length
return wallsize
@staticmethod
def generateWalls(gamesize):
coords = (range(0, gamesize+1))
location: list[tuple] = []
for i in coords:
location.append([(i), (0)])
for i in coords:
location.append([(i), (gamesize)])
for i in coords:
location.append([(gamesize), (i)])
for i in coords:
location.append([(0), (i)])
return location