generated from mwc/project_game
add asteroids
This project has sparked a interest in seeing what else i can creatate using coding
This commit is contained in:
@@ -8,20 +8,18 @@ class Alien:
|
||||
self.position = position
|
||||
|
||||
def play_turn(self, game):
|
||||
|
||||
width, height = game.board_size
|
||||
|
||||
x, y = self.position
|
||||
|
||||
directions = [
|
||||
(-1, 0), # left
|
||||
(1, 0), # right
|
||||
(0, -1), # up
|
||||
(0, 1), # down
|
||||
(-1, -1), # up-left
|
||||
(-1, 1), # down-left
|
||||
(1, -1), # up-right
|
||||
(1, 1) # down-right
|
||||
(-2, 0), # left
|
||||
(2, 0), # right
|
||||
(0, -2), # up
|
||||
(0, 2), # down
|
||||
(-2, -2), # up-left
|
||||
(-2, 2), # down-left
|
||||
(2, -2), # up-right
|
||||
(2, 2) # down-right
|
||||
]
|
||||
|
||||
possible_positions = []
|
||||
|
||||
Reference in New Issue
Block a user