Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4486 closed enhancement (fixed)

Cookie Search activity should refresh state when re-opened

Reported by: Rach4d Owned by: Rach4d
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: untriaged Version: 0.98.x
Severity: Unspecified Keywords: CookieSearch
Cc: Walter Distribution/OS: Ubuntu
Bug Status: Assigned

Description

In the game if the user plays a game and quits, without restarting a new game, the state from the previous game remains when the activity is re-opened. This can be show by playing a game, clicking a few cells, exiting the activity, and then re-opening it. It would be nice if the game refreshed the state after it is re-opened.

Walter I have attached a working solution to this. Some alterations were made to the game.py file inside of the CookieSearch activity.

Attachments (2)

diff.patch (851 bytes) - added by Rach4d 11 years ago.
Patch made to game.py from CookieSearch Activity
orig.patch (510 bytes) - added by sumitzster 11 years ago.
Patch file

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by Rach4d

Patch made to game.py from CookieSearch Activity

comment:1 Changed 11 years ago by walter

I wonder if the better thing to do would be to make the resuming of a game work???

Changed 11 years ago by sumitzster

Patch file

comment:2 Changed 11 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in v7 (by properly parsing the saved game in the Restore function) Tip of the hat to Sumit Shyamsukha.

comment:3 Changed 11 years ago by sumitzster

Patch file uploaded, the restore_game function had the bug. Fixed it and tested on Ubuntu. Should work fine. Thanks a ton for all the help, Walter.

comment:4 Changed 11 years ago by sumitzster

Patch file uploaded, the restore_game function had the bug. Fixed it and tested on Ubuntu. Should work fine. Thanks a ton for all the help, Walter.

comment:5 Changed 11 years ago by walter

I am not sure that your patch applies properly to the current state of the code. Is not the same functionality achieved by the code beginning here?

https://git.sugarlabs.org/cookiesearch/cookiesearch/blobs/master/game.py#line128

Note: See TracTickets for help on using tickets.