generated from mwc/project_game
This is my third commit. I made the cars 2 in length although I am having a problem where they break apart sometimes.
I am getting very close to finishing the project. I was having a problem where I made the symbol for the cars 'OO' and only one of the 'O' was leaving the screen when it made it to the far right of the screen. I emailed you and you said to only make the symbol 'O' and spawn 2 right next to each other. I figured out how to do this by myself but am now trying to figure out why they are breaking apart.
This commit is contained in:
4
path.py
4
path.py
@@ -1,5 +1,5 @@
|
||||
class Car:
|
||||
character = 'OO'
|
||||
character = 'O'
|
||||
|
||||
def __init__(self, position):
|
||||
self.position = position
|
||||
@@ -25,7 +25,7 @@ class Car:
|
||||
def play_turn(self, game):
|
||||
lives = 3
|
||||
width, height = game.board_size
|
||||
if game.turn_number % 2 == 0:
|
||||
if game.turn_number: #% 3 == 0:
|
||||
x, y = self.position
|
||||
if x == width - 1:
|
||||
game.remove_agent(self)
|
||||
|
||||
Reference in New Issue
Block a user