[Kde-games-devel] Review Request 127171: KBlocks: Fix unplayable game when changing difficulty

Albert Astals Cid aacid at kde.org
Thu Feb 25 22:19:03 UTC 2016


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


Ship it!




This seems like a nice little bugfix, i'd say commit it to Applications/15.12 and then merge to master instead of just master.

- Albert Astals Cid


On Feb. 25, 2016, 8:58 p.m., Julian Helfferich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127171/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2016, 8:58 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Bugs: 339038
>     http://bugs.kde.org/show_bug.cgi?id=339038
> 
> 
> Repository: kblocks
> 
> 
> Description
> -------
> 
> This patch fixes bug #339038.
> 
> When the difficulty is changed before a game is started, pressing keys on the keyboard does not have any effect, rendering the game unplayable.
> 
> The reason is that KBlocksWin::levelChanged() calls KBlocksWin::startGame(). However, no player has yet been added to the KBlocksPlayManager.
> 
> Now, KBlocksWin::levelChanged() calls either KBlocksWin::singleGame() or KBlocksWin::pveStepGame(). These functions are also called when the "Single Game" button is pressed or the "Human vs. AI" menu is selected, respectively.
> 
> To determine whether to start "Single game" or "Human vs AI", the current game type is stored in a new variable. Thus, changing the difficulty always starts the currently running or just finished game type.
> 
> 
> Diffs
> -----
> 
>   KBlocksWin.h c07d5d3 
>   KBlocksWin.cpp 24c4b54 
> 
> Diff: https://git.reviewboard.kde.org/r/127171/diff/
> 
> 
> Testing
> -------
> 
> 1) Started a first game
> 2) Restarted a running game
> 3) Restarted a finished game
> 
> each by either
> 
> A) Changing the difficulty
> B) Pressing the "Single Game" button
> C) Selecting "Human vs AI" from the menu
> 
> 
> Thanks,
> 
> Julian Helfferich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20160225/0fe9c5cd/attachment-0001.html>


More information about the kde-games-devel mailing list