[Kde-games-devel] Review Request 114871: [knavalbattle] To enable two phase place ships, to be able to restart placing them from scratch
Roney Gomes
roney477 at gmail.com
Wed Jan 15 12:16:12 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114871/#review47438
-----------------------------------------------------------
The amount of changes you'll need for this is getting bigger, to the point of not fitting the small patches purpose of Review Board. A sign of this is that you had to reference a previous patch so this one could make sense.
I think it will be the best, for both of us, if you set up a branch just for this new feature. Got committing as you progress, paying attention to not break the game on each commit. This way we have the possibility of reverting to a previous commit case it's needed.
- Roney Gomes
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/346c55e1/attachment.html>
More information about the kde-games-devel
mailing list