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

Albert Astals Cid aacid at kde.org
Sun Feb 28 10:49:51 UTC 2016


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


Ship it!




Ship It!

- Albert Astals Cid


On Feb. 26, 2016, 7:08 p.m., Julian Helfferich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127171/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2016, 7:08 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.cpp ca8139e 
> 
> 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/20160228/4463319d/attachment.html>


More information about the kde-games-devel mailing list