<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/114871/">https://git.reviewboard.kde.org/r/114871/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDE Games and Roney Gomes.</div>
<div>By Jaime Torres Amate.</div>
<p style="color: grey;"><i>Updated Jan. 16, 2014, 12:24 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
knavalbattle
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/aientity.h <span style="color: grey">(d8fc057)</span></li>
<li>src/aientity.cpp <span style="color: grey">(b085786)</span></li>
<li>src/controller.h <span style="color: grey">(0165b02)</span></li>
<li>src/controller.cpp <span style="color: grey">(df44ff4)</span></li>
<li>src/entity.h <span style="color: grey">(fa45a35)</span></li>
<li>src/mainwindow.cpp <span style="color: grey">(42e04b4)</span></li>
<li>src/networkentity.h <span style="color: grey">(bfcfdf4)</span></li>
<li>src/networkentity.cpp <span style="color: grey">(6609022)</span></li>
<li>src/playerentity.h <span style="color: grey">(aae134e)</span></li>
<li>src/playerentity.cpp <span style="color: grey">(230f1ec)</span></li>
<li>src/playfield.h <span style="color: grey">(431b740)</span></li>
<li>src/playfield.cpp <span style="color: grey">(1ea0955)</span></li>
<li>src/seaview.h <span style="color: grey">(b3099be)</span></li>
<li>src/seaview.cpp <span style="color: grey">(34d44c3)</span></li>
<li>src/uientity.h <span style="color: grey">(952003b)</span></li>
<li>src/uientity.cpp <span style="color: grey">(e629879)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/114871/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>