Skip to content

Commit

Permalink
Update state without checking values
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeg committed Aug 2, 2020
1 parent 9d8147d commit 0b1100a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nestris_ocr/scan_strat/base_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self):
self.start_level = None
self.field = None
self.preview = None
self.gameid = 0
self.gameid = 1
self.piece_stats = PieceStatAccumulator()
self.gamestate = GameState.MENU
self.cur_piece = None
Expand Down
3 changes: 2 additions & 1 deletion nestris_ocr/scan_strat/naive_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
class NaiveStrategy(BaseStrategy):
def __init__(self, *args):
super(NaiveStrategy, self).__init__(*args)
self.gamestate = GameState.IN_GAME # allows starting OCR mid-game
self.tasks = self.setup_tasks()
self.interpolate = config["calibration.color_interpolation"]

Expand Down Expand Up @@ -81,7 +82,7 @@ def update_menu(self):

if self.lines and self.score and self.level:
self.gamestate = GameState.IN_GAME
if self.lines == "000" and self.score == "000000":
if (self.lines == "000" or self.lines == "025") and self.score == "000000":
return True

return False
Expand Down

0 comments on commit 0b1100a

Please sign in to comment.