[Kde-games-devel] Review Request 115048: Refactor Palapeli Scene and MainWindow into a new GamePlay class

Ian Wadham iandw.au at gmail.com
Fri Jan 24 01:42:24 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115048/
-----------------------------------------------------------

(Updated Jan. 24, 2014, 1:42 a.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Games.


Repository: palapeli


Description
-------

Methods relating to the puzzle as a whole have been moved from Palapeli::Scene and Palapeli::MainWindow into Palapeli::GamePlay, including implementations of menu and toolbar actions, puzzle loading and shuffling, puzzle saving and restoring, victory animation and progress reporting.

The changes to Palapeli::Scene are to provide a simpler, more generic class that can be used in multiple scenes, i.e. the original puzzle table and any number of piece-holders for use in solving large puzzles.
    
The main methods remaining in Palapeli::Scene are adding and removing pieces, moving pieces, merging (or joining) pieces and signalling changes in the state of the puzzle and its pieces, wherever they may be in the puzzle table or piece-holders.

The attached diff is the end result of all the changes, for information and code-review. There should be no change to Palapeli features or functionality.

The six commits involved have all been pushed to origin master.


Diffs
-----

  src/window/mainwindow.cpp e3656e0 
  src/window/puzzletablewidget.cpp f4de012 
  src/CMakeLists.txt d99ba22 
  src/engine/gameplay.h PRE-CREATION 
  src/engine/gameplay.cpp PRE-CREATION 
  src/engine/piece.h b94b2eb 
  src/engine/piece.cpp 9b94d0d 
  src/engine/scene.h 5cd524e 
  src/engine/scene.cpp 92e11b4 
  src/engine/view.cpp ed814b8 
  src/window/mainwindow.h 1f414b5 

Diff: https://git.reviewboard.kde.org/r/115048/diff/


Testing
-------

Used an 8-piece and a 500-piece puzzle to check that all the functions in the life-cycle of a Palapeli jigsaw puzzle work as they did before, but there could still be some bugs that were introduced by the changes. Features checked included puzzle loading, bevels on pieces, shadows on pieces, highlighting selections using colored shadows, saving the puzzle state continuously (at least within 500 msec), restoring the puzzle state, reporting progress, shuffling a puzzle, restarting a puzzle, moving the scene-boundary and providing a victory animation when the puzzle is solved.

Possible regressions in other KActions have not yet been checked, e.g. puzzle creation, export, import and deletion.

It was noted that Palapeli has no interlock or cancellation between actions when an action takes some time. For example, it is possible to do 'Back to collection' while a puzzle is loading and select another puzzle, but the first puzzle goes on loading ...


Thanks,

Ian Wadham

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20140124/107f5555/attachment.html>


More information about the kde-games-devel mailing list