Skip to content

Commit

Permalink
Fix bug when change to ai mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce-Ch committed Oct 6, 2022
1 parent 3997216 commit aae9579
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*.sqlite
*.sqlite-journal
ProjectSettings.json
.suo
.suo
.vscode
2 changes: 1 addition & 1 deletion AI_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self):
self.direction = None

def control(self, sqs_given, status):
if sqs_given.curr_sq == sqs_given.st.new:
if sqs_given.curr_sq == sqs_given.st.new or self.direction is None:
self.direction = make_choice(sqs_given)
else:
move(sqs_given, self.direction, status)
Expand Down
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Settings:
def __init__(self):
# times or speed, in seconds, you can adjust this if youre not satisfied by the default
# times or speed, in seconds, you can adjust this if youre not satisfied by the default
self.time_drop = 0.8 # period to force drop
self.time_drop_adjust = 0.99 # every score up, decrease drop time by this factor
self.time_stop = 0.5 # time player can adjust pos at bottom
Expand Down

0 comments on commit aae9579

Please sign in to comment.