Skip to content

Commit

Permalink
Ported game to lazy evel: Huge Speed Improvements!
Browse files Browse the repository at this point in the history
  • Loading branch information
metastableB committed Apr 1, 2017
1 parent 9818e05 commit 144b9d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Tasks.todo
Expand Up @@ -18,10 +18,11 @@ Development:
☐ Typo; replace all 'cordinate' with 'coordinates'
☐ Whenever a next action or related method is being called, check first if game is over!
☐ Add a proper way to specify the dependency between certain search agents and the depth argument
PRIORITY: Modify `dlsnake.base.gameState` to use lazy evaluation for grid creation.
PRIORITY: Modify `dlsnake.base.gameState` to use lazy evaluation for grid creation. @done (17-04-02 01:05)
Technically, grid construction is unnecessary for the logic to work
and this lazy evaluation can significantly speed things up.
☐ `--csv` and `--silent` options seem to be broken. Investigate.
☐ Add flag to save pygame rendered images to folder.

Pertaining to Project:
✔ Implement manual play @done (17-03-30 02:43)
Expand Down
2 changes: 0 additions & 2 deletions dlsnake/snakeGame.py
Expand Up @@ -43,7 +43,6 @@ def playGameUser(gameState, gui, enableText=False):
if len(eventList) is not 0:
gameState.chooseAction(eventList[-1])
gameState.executeAction()
gameState.update()
died = gameState.gameOver
gui.show()
if enableText:
Expand Down Expand Up @@ -76,7 +75,6 @@ def playGameAgent(gameState, guiDriver, agent,
action = agent.getAction(gameState)
gameState.chooseAction(action)
gameState.executeAction()
gameState.update()
if enableGUI:
guiDriver.show()
if enableTextGraphics:
Expand Down

0 comments on commit 144b9d2

Please sign in to comment.