[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-games-devel
Subject: [Kde-games-devel] Re: Review Request: fix 215352 bug
From: "Wolfgang Rohdewald" <wolfgang () rohdewald ! de>
Date: 2010-10-23 15:40:45
Message-ID: 20101023154045.18290.68607 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5682/#review8322
-----------------------------------------------------------
For testing you can simply make sure that any two tiles match. Then any game is alway \
winnable. Here comes the patch (untested):
--- x.cpp 2010-10-23 17:33:00.586617000 +0200
+++ GameData.cpp 2010-10-23 17:33:16.656617001 +0200
@@ -678,13 +678,7 @@
// don't compare 'equal' positions
if( memcmp( &Pos1, &Pos2, sizeof(POSITION) ) )
{
- UCHAR FA = Pos1.f;
- UCHAR FB = Pos2.f;
-
- if( (FA == FB)
- || ( isFlower( FA ) && isFlower( FB ) )
- || ( isSeason( FA ) && isSeason( FB ) ) )
- return( true );
+ return( true );
}
return( false );
}
- Wolfgang
On 2010-10-23 12:50:22, Antonis Tsiapaliokas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5682/
> -----------------------------------------------------------
>
> (Updated 2010-10-23 12:50:22)
>
>
> Review request for KDE Games.
>
>
> Summary
> -------
>
> Hello
>
> This is my first effort to help the kdegames,so i am sorry if i have done something \
> wrong...This bug regards the kmahjongg game.This patch is fixing the bug 215352.All \
> the information that you will need, are located into the bug report... With a few \
> words, after someone wins, the undo button is still enable and full functional...
>
> This addresses bug 215352.
> https://bugs.kde.org/show_bug.cgi?id=215352
>
>
> Diffs
> -----
>
> trunk/KDE/kdegames/kmahjongg/kmahjongg.cpp 1188798
>
> Diff: http://svn.reviewboard.kde.org/r/5682/diff
>
>
> Testing
> -------
>
> The kmahjongg game compiles and runs fine.But there is a problem,which it will \
> sound to you very silly... I have create the patch but i cannot win the game so i \
> cannot test my patch... But i have found another way to test my patch, and there \
> works fine... If you look at the kmahjongg.cpp (it is located into the \
> kdegames/kmahjongg) at the lines 174("undoAction = KStandardGameAction::undo(this, \
> SLOT(undo()), actionCollection());") and 119-120 (connect( bw, SIGNAL( \
> gameOver(unsigned short , unsigned short)), this,SLOT( gameOver(unsigned short , \
> unsigned short)));) those two functions are connected with the bw object.So if i \
> add the code from my patch into the KMahjongg::undo() method and after i make 10 \
> moves into the game, i will be able to undo only the last one because when i hit \
> the undo button then, the code from my patch is called and the undo button is \
> becoming dissable (from enable). So instead of adding the code into the \
> KMahjongg::undo(), if i add it, into the KMahjongg::gameOver() then it should work \
> fine... I know that this is very wrong, as regards the testing for my patch but i \
> could not find something better...
>
> Thanks,
>
> Antonis
>
>
[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="http://svn.reviewboard.kde.org/r/5682/">http://svn.reviewboard.kde.org/r/5682/</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;">For testing you can \
simply make sure that any two tiles match. Then any game is alway winnable. Here \
comes the patch (untested):
--- x.cpp 2010-10-23 17:33:00.586617000 +0200
+++ GameData.cpp 2010-10-23 17:33:16.656617001 +0200
@@ -678,13 +678,7 @@
// don't compare 'equal' positions
if( memcmp( &Pos1, &Pos2, sizeof(POSITION) ) )
{
- UCHAR FA = Pos1.f;
- UCHAR FB = Pos2.f;
-
- if( (FA == FB)
- || ( isFlower( FA ) && isFlower( FB ) )
- || ( isSeason( FA ) && isSeason( FB ) ) )
- return( true );
+ return( true );
}
return( false );
}
</pre>
<br />
<p>- Wolfgang</p>
<br />
<p>On October 23rd, 2010, 12:50 p.m., Antonis Tsiapaliokas wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KDE Games.</div>
<div>By Antonis Tsiapaliokas.</div>
<p style="color: grey;"><i>Updated 2010-10-23 12:50:22</i></p>
<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;">Hello
This is my first effort to help the kdegames,so i am sorry if i have done something \
wrong...This bug regards the kmahjongg game.This patch is fixing the bug 215352.All \
the information that you will need, are located into the bug report... With a few \
words, after someone wins, the undo button is still enable and full \
functional...</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;">The kmahjongg game compiles and runs fine.But there is a problem,which \
it will sound to you very silly... I have create the patch but i cannot win the game \
so i cannot test my patch... But i have found another way to test my patch, and there \
works fine... If you look at the kmahjongg.cpp (it is located into the \
kdegames/kmahjongg) at the lines 174("undoAction = \
KStandardGameAction::undo(this, SLOT(undo()), actionCollection());") and 119-120 \
(connect( bw, SIGNAL( gameOver(unsigned short , unsigned short)), this,SLOT( \
gameOver(unsigned short , unsigned short)));) those two functions are connected with \
the bw object.So if i add the code from my patch into the KMahjongg::undo() method \
and after i make 10 moves into the game, i will be able to undo only the last one \
because when i hit the undo button then, the code from my patch is called and the \
undo button is becoming dissable (from enable). So instead of adding the code into \
the KMahjongg::undo(), if i add it, into the KMahjongg::gameOver() then it should \
work fine... I know that this is very wrong, as regards the testing for my patch but \
i could not find something better...</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=215352">215352</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/KDE/kdegames/kmahjongg/kmahjongg.cpp <span style="color: \
grey">(1188798)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/5682/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