[Kde-games-devel] Review Request 114871: [knavalbattle] To enable two phase place ships, to be able to restart placing them from scratch
Jaime Torres Amate
jtamate at gmail.com
Wed Jan 15 19:06:27 UTC 2014
> On Jan. 15, 2014, 12:10 p.m., Roney Gomes wrote:
> > src/playfield.cpp, line 306
> > <https://git.reviewboard.kde.org/r/114871/diff/2/?file=230208#file230208line306>
> >
> > Avoid comments like this. Your code doesn't need any explanation, it's sufficiently straightforward to talk for itself.
fixed, a fixme: that remainded as a comment.
now in the branch multipleShips with commit 83337d7d90ac941d9a24e33ae7bc4740d280e885
- Jaime Torres
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114871/#review47435
-----------------------------------------------------------
On Jan. 5, 2014, 1 p.m., Jaime Torres Amate wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114871/
> -----------------------------------------------------------
>
> (Updated Jan. 5, 2014, 1 p.m.)
>
>
> Review request for KDE Games and Roney Gomes.
>
>
> Repository: knavalbattle
>
>
> Description
> -------
>
> This patch depends on the utilities for multiple ships patch (only because of the canAddShipsOfShize(size) method).
> There are now two phases in the game, also used in the seaview status, placing and playing. Placing can be restarted several times without disturbing the other player.
> Before:
> controller called entity start and waited for 2 answers.
> Now:
> controller calls entity startPlacing and waits for 2 ready() signals, then it calls start and waits for 2 more answers.
> if a player can not finish placing its ships, a restartPlacingShips() signal is emited (and not the ready() signal). It reaches playfield where a messagebox is displayed to restart or abort the game (missing, I'm not sure about this option).
> This patch only affects the human player (the AI, so fast, will retry automatically until a good placement is reached).
> For the network player, it assumes the other player has finished placing its ships, but still needs another message (received when the other player finishes placing ships) to start shooting.
>
>
> Another possibility is to make use of an Undo function (but I always played in paper with pen, not pencil)
>
>
> Diffs
> -----
>
> src/aientity.h d8fc057
> src/aientity.cpp b085786
> src/controller.h 0165b02
> src/controller.cpp df44ff4
> src/entity.h fa45a35
> src/mainwindow.cpp 42e04b4
> src/networkentity.h bfcfdf4
> src/networkentity.cpp 6609022
> src/playerentity.h aae134e
> src/playerentity.cpp 230f1ec
> src/playfield.h 431b740
> src/playfield.cpp 1ea0955
> src/seaview.h b3099be
> src/seaview.cpp 34d44c3
> src/uientity.h 952003b
> src/uientity.cpp e629879
>
> Diff: https://git.reviewboard.kde.org/r/114871/diff/
>
>
> Testing
> -------
>
> Finally, it works in local and remote games.
> The normal game workflow can be tested without any modification.
> The restart workflow can be tested with a little modification in the canAddShipsOfShize(size) to return false sometimes.
> I'm reworking the multiple ships patch to make it much more flexible in the number of ships, their size and the board size for network games.
>
>
> Thanks,
>
> Jaime Torres Amate
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20140115/50193d08/attachment.html>
More information about the kde-games-devel
mailing list