add asteroids

This project has sparked a interest in seeing what else i can creatate using coding
This commit is contained in:
tsmith37
2025-12-09 20:02:49 -05:00
parent 35ed9eb328
commit 69138c8466
5 changed files with 15 additions and 18 deletions

View File

@@ -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 = []