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

List:       kde-games-devel
Subject:    Re: Review Request 129015: Fix "switchBall" logic when no balls available to use in repository
From:       Stefan Yohansson Areeira Pinto <sy.fen0 () gmail ! com>
Date:       2017-07-27 13:40:18
Message-ID: 20170727134018.30502.83432 () mimi ! kde ! org
[Download RAW message or body]

--===============5408646095833445093==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On July 27, 2017, 8:21 a.m., Albert Astals Cid wrote:
> > I am not sure we have anyone left that understands how kblackbox works anymore, \
> > could you please try to give some explanation on the videos so i can try to \
> > understand the fix? 
> > Thanks!
> 
> Stefan Yohansson Areeira Pinto wrote:
> Sure. Kblackbox is a game where you need to guess where are some balls, so you \
> place hint balls and shoot beams to try to guess where the balls are. 
> on the first video, we have the "hint balls", it's limited by the difficulty of the \
> game, in that case I had four balls. After place all available balls, I can \
> continue placing more and more balls (the bug). 
> The fix only prevent this behaviour checking if you have used all available balls.
> 
> Albert Astals Cid wrote:
> Right, isn't the patch you want actually just 
> 
> diff --git a/kbbscalablegraphicwidget.cpp b/kbbscalablegraphicwidget.cpp
> index b9ca8f7..d40cd89 100644
> --- a/kbbscalablegraphicwidget.cpp
> +++ b/kbbscalablegraphicwidget.cpp
> @@ -542,7 +542,7 @@ void KBBScalableGraphicWidget::switchBall()
> {
> if ((m_balls->containsVisible(m_cursor->boxPosition())) || \
> (m_ballsUnsure->containsVisible(m_cursor->boxPosition()))) \
>                 removeBall(m_cursor->boxPosition());
> -       else
> +       else if (m_ballRepository->ballToTake() != KBBGraphicsItemSet::NO_INDEX)
> addBall(m_cursor->boxPosition());
> }
> 
> 
> 
> ?

sure, it's a way better. I'll update the diff.


- Stefan Yohansson


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


On July 24, 2017, 10:22 a.m., Stefan Yohansson Areeira Pinto wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129015/
> -----------------------------------------------------------
> 
> (Updated July 24, 2017, 10:22 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: kblackbox
> 
> 
> Description
> -------
> 
> If you have only two balls in repository (very easy mode),
> you can place more then two balls on blackbox.
> 
> 
> Diffs
> -----
> 
> kbbscalablegraphicwidget.cpp b9ca8f7 
> 
> Diff: https://git.reviewboard.kde.org/r/129015/diff/
> 
> 
> Testing
> -------
> 
> bug:
> https://vimeo.com/184207730
> 
> bugfix:
> https://vimeo.com/184207731
> 
> 
> Thanks,
> 
> Stefan Yohansson Areeira Pinto
> 
> 


--===============5408646095833445093==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129015/">https://git.reviewboard.kde.org/r/129015/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On July 27th, 2017, 8:21 a.m. BRT, <b>Albert \
Astals Cid</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I am not sure we have anyone left that understands how \
kblackbox works anymore, could you please try to give some explanation on the videos \
so i can try to understand the fix?</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Thanks!</p></pre>  \
</blockquote>




 <p>On July 27th, 2017, 8:36 a.m. BRT, <b>Stefan Yohansson Areeira Pinto</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Sure. Kblackbox is a game where you need to guess where are some balls, so \
you place hint balls and shoot beams to try to guess where the balls are.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">on the first video, we have the "hint balls", it's limited by the \
difficulty of the game, in that case I had four balls. After place all available \
balls, I can continue placing more and more balls (the bug).</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The \
fix only prevent this behaviour checking if you have used all available \
balls.</p></pre>  </blockquote>





 <p>On July 27th, 2017, 9:58 a.m. BRT, <b>Albert Astals Cid</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Right, isn't the patch you want actually just </p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">diff \
--git a/kbbscalablegraphicwidget.cpp b/kbbscalablegraphicwidget.cpp index \
                b9ca8f7..d40cd89 100644
--- a/kbbscalablegraphicwidget.cpp
+++ b/kbbscalablegraphicwidget.cpp
@@ -542,7 +542,7 @@ void KBBScalableGraphicWidget::switchBall()
 {
        if ((m_balls-&gt;containsVisible(m_cursor-&gt;boxPosition())) || \
(m_ballsUnsure-&gt;containsVisible(m_cursor-&gt;boxPosition())))  \
                removeBall(m_cursor-&gt;boxPosition());
-       else
+       else if (m_ballRepository-&gt;ballToTake() != KBBGraphicsItemSet::NO_INDEX)
                addBall(m_cursor-&gt;boxPosition());
 }</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">?</p></pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">sure, \
it's a way better. I'll update the diff.</p></pre> <br />










<p>- Stefan Yohansson</p>


<br />
<p>On July 24th, 2017, 10:22 a.m. BRT, Stefan Yohansson Areeira Pinto wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Games.</div>
<div>By Stefan Yohansson Areeira Pinto.</div>


<p style="color: grey;"><i>Updated July 24, 2017, 10:22 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kblackbox
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">If you have only two balls in repository (very easy \
mode), you can place more then two balls on blackbox.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">bug: https://vimeo.com/184207730</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">bugfix: https://vimeo.com/184207731</p></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>kbbscalablegraphicwidget.cpp <span style="color: grey">(b9ca8f7)</span></li>

</ul>

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






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







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


--===============5408646095833445093==--


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

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