[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Review Request 116483: Restart button works and uses the current game configur
From:       "Roney Gomes" <roney477 () gmail ! com>
Date:       2014-03-10 1:34:32
Message-ID: 20140310013432.12361.70920 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


Thank you very much for you current work on KNavalBattle. Besides the small issues I \
pointed below, everything seems to be OK. Didn't notice anything abnormal while \
running the game.

Cheers.


src/controller.h
<https://git.reviewboard.kde.org/r/116483/#comment37115>

    Could you please use camel case for m_battle_ships_configuration?



src/controller.h
<https://git.reviewboard.kde.org/r/116483/#comment37116>

    I'm not sure what "restartC" means. "Restart Controller" perhaps? If so, \
considering we're at the controller class already, why not just call it "restart"?



src/controller.cpp
<https://git.reviewboard.kde.org/r/116483/#comment37117>

    Please, to maintain the current code style, put spaces between binary operators \
and its operands. I mean "m_ready = 0"



src/networkentity.cpp
<https://git.reviewboard.kde.org/r/116483/#comment37118>

    Again, the spacing problem.



src/networkentity.cpp
<https://git.reviewboard.kde.org/r/116483/#comment37119>

    The same spacing problem once again. ;-)



src/playfield.h
<https://git.reviewboard.kde.org/r/116483/#comment37120>

    What does "restartPF" mean? Restart Playfield I suppose. If so, what's the need \
of this change? A restart method at the Playfield class is meaningful enough for me \
-- at least -- to have a glimpse about what it does.


- Roney Gomes


On Feb. 28, 2014, 4:22 p.m., Jaime Torres Amate wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116483/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2014, 4:22 p.m.)
> 
> 
> Review request for KDE Games and Roney Gomes.
> 
> 
> Repository: knavalbattle
> 
> 
> Description
> -------
> 
> The restart button made the network game use the wrong configuration (it created a \
> new controller), now it uses the current game configuration (and controller). It \
> restarted the chat and sent again the nick, now it is not needed and is not done. 
> I have introduced, I needed it desperately, the name of the message interchanged as \
> an XML attribute (totally backwards compatible). in protocol.cpp and message.h 
> 
> Diffs
> -----
> 
> src/controller.h eb5f63f 
> src/controller.cpp 3a26170 
> src/entity.h c6fcdbc 
> src/entity.cpp 3104029 
> src/mainwindow.cpp 7ef4482 
> src/message.h 58b5beb 
> src/networkentity.h aa66543 
> src/networkentity.cpp f19b1d5 
> src/playerentity.cpp c6b0a1d 
> src/playfield.h 5766022 
> src/playfield.cpp 5ebfbc2 
> src/protocol.cpp 2416164 
> src/sea.cpp 77a8864 
> 
> Diff: https://git.reviewboard.kde.org/r/116483/diff/
> 
> 
> Testing
> -------
> 
> Lots of network games against myself (and some local games against AI too).
> Place half the ships to see if it was possible to start to shoot too soon, make one \
> of them unable to finish placing the remaining ships several times, then finish \
> it... waiting for the opposite to finish placing ships. Do the same with the other \
> player.. Start shooting (some times finishing the game), and then press restart.  
> 
> Thanks,
> 
> Jaime Torres Amate
> 
> 


[Attachment #5 (text/html)]

<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/116483/">https://git.reviewboard.kde.org/r/116483/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thank you very much for \
you current work on KNavalBattle. Besides the small issues I pointed below, \
everything seems to be OK. Didn&#39;t notice anything abnormal while running the \
game.

Cheers.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251049#file251049line61" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/controller.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">public:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">61</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kr">inline</span> <span class="n">BattleShipsConfiguration</span><span \
class="o">&amp;</span> <span class="n">getBattleShipsConfiguration</span><span \
class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span \
class="n">m_battle_ships_configuration</span><span class="p">;</span> <span \
class="p">}</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Could you \
please use camel case for m_battle_ships_configuration?</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251049#file251049line70" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/controller.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">public:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">70</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">void</span> <span class="nf">restartC</span><span class="p">(</span><span \
class="kt">bool</span> <span class="n">ask</span> <span class="o">=</span> <span \
class="nb">false</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;m not \
sure what &quot;restartC&quot; means. &quot;Restart Controller&quot; perhaps? If so, \
considering we&#39;re at the controller class already, why not just call it \
&quot;restart&quot;?</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251050#file251050line155" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/controller.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">155</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">m_ready</span><span class="o">=</span><span class="mi">0</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please, to \
maintain the current code style, put spaces between binary operators and its \
operands. I mean &quot;m_ready = 0&quot;</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251056#file251056line71" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/networkentity.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">70</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">m_restarted</span><span class="o">=</span><span class="nb">true</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Again, the \
spacing problem.</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251056#file251056line82" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/networkentity.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">81</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">m_restarted</span><span class="o">=</span><span class="nb">true</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The same \
spacing problem once again. ;-)</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/116483/diff/1/?file=251058#file251058line52" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/playfield.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">public:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">52</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">void</span> <span class="nf">restart</span><span class="p">(</span><span \
class="kt">bool</span> <span class="n">ask</span> <span class="o">=</span> <span \
class="nb">true</span><span class="p">);</span></pre></td>  <th bgcolor="#e9eaa8" \
style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">52</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">void</span> <span class="nf">restart<span class="hl">PF</span></span><span \
class="p">(</span><span class="kt">bool</span> <span class="n">ask</span> <span \
class="o">=</span> <span class="nb">true</span><span class="p">);</span></pre></td>  \
</tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What does \
&quot;restartPF&quot; mean? Restart Playfield I suppose. If so, what&#39;s the need \
of this change? A restart method at the Playfield class is meaningful enough for me \
-- at least -- to have a glimpse about what it does.</pre> </div>
<br />



<p>- Roney Gomes</p>


<br />
<p>On February 28th, 2014, 4:22 p.m. UTC, Jaime Torres Amate wrote:</p>








<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 Feb. 28, 2014, 4:22 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;">The restart button made the network game use the wrong configuration (it \
created a new controller), now it uses the current game configuration (and \
controller). It restarted the chat and sent again the nick, now it is not needed and \
is not done.

I have introduced, I needed it desperately, the name of the message interchanged as \
an XML attribute (totally backwards compatible). in protocol.cpp and message.h</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;">Lots of network games against myself (and some local games against AI \
too). Place half the ships to see if it was possible to start to shoot too soon, make \
one of them unable to finish placing the remaining ships several times, then finish \
it... waiting for the opposite to finish placing ships. Do the same with the other \
player.. Start shooting (some times finishing the game), and then press restart. \
</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/controller.h <span style="color: grey">(eb5f63f)</span></li>

 <li>src/controller.cpp <span style="color: grey">(3a26170)</span></li>

 <li>src/entity.h <span style="color: grey">(c6fcdbc)</span></li>

 <li>src/entity.cpp <span style="color: grey">(3104029)</span></li>

 <li>src/mainwindow.cpp <span style="color: grey">(7ef4482)</span></li>

 <li>src/message.h <span style="color: grey">(58b5beb)</span></li>

 <li>src/networkentity.h <span style="color: grey">(aa66543)</span></li>

 <li>src/networkentity.cpp <span style="color: grey">(f19b1d5)</span></li>

 <li>src/playerentity.cpp <span style="color: grey">(c6b0a1d)</span></li>

 <li>src/playfield.h <span style="color: grey">(5766022)</span></li>

 <li>src/playfield.cpp <span style="color: grey">(5ebfbc2)</span></li>

 <li>src/protocol.cpp <span style="color: grey">(2416164)</span></li>

 <li>src/sea.cpp <span style="color: grey">(77a8864)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/116483/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic