Skip to content

Feature Addition#14

Open
sourabhaa wants to merge 6 commits into
sugarlabs:masterfrom
sourabhaa:feature-save-and-restore
Open

Feature Addition#14
sourabhaa wants to merge 6 commits into
sugarlabs:masterfrom
sourabhaa:feature-save-and-restore

Conversation

@sourabhaa
Copy link
Copy Markdown
Contributor

3 puzzles per level; separate best-time per level.

Comment thread game.py Outdated
Comment thread game.py Outdated
Comment thread game.py
Comment thread game.py Outdated
Comment thread game.py Outdated
@chimosky
Copy link
Copy Markdown
Member

chimosky commented Sep 1, 2021

Tested f9eeb5f, game freezes at the fourth game - first game of new level - the tiles are clickable but it's still showing as level complete. Also the best level was set to 00:01 and this was a new instance.

Logs show;

Traceback (most recent call last):
  File "/home/ibiam/Activities/flip/game.py", line 183, in gameover
    best_seconds = (self.best_time[self._edge-4]) % 60
IndexError: list index out of range

@sourabhaa
Copy link
Copy Markdown
Contributor Author

This might be because of the values already stored in best-time file. I guess changing either the destination file or deleting the existing file would work. I've changed the destination file to test, it worked fine then. Kindly test 2d881fe.

@chimosky
Copy link
Copy Markdown
Member

chimosky commented Sep 6, 2021

Tested 2d881fe, works as expected but there's a new problem and I've attached a screenshot below although the logs don't show any reason why but it happens at the same time as the previously reported issue - right at the end of the fourth game -.

I don't get the IndexError anymore but I don't think your last commit fixes it, the save and restore feature should involve the puzzle and not just the timer.

Screenshot from 2021-09-06 19-15-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants