[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kreversi_rewrite
From: Dmitry Suzdalev <dimsuz () gmail ! com>
Date: 2006-08-21 11:14:01
Message-ID: 1156158841.724254.3289.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 575341 by dimsuz:
Fixed some FIXME's
M +3 -3 Engine.cpp
M +0 -5 Engine.h
M +0 -2 kreversigame.cpp
M +2 -4 kreversiscene.cpp
M +2 -1 kreversiscene.h
M +1 -1 mainwindow.cpp
--- branches/work/kreversi_rewrite/Engine.cpp #575340:575341
@@ -296,9 +296,9 @@
// Some special values used in the search.
-const int Engine::LARGEINT = 99999;
-const int Engine::ILLEGAL_VALUE = 8888888;
-const int Engine::BC_WEIGHT = 3;
+static const int LARGEINT = 99999;
+static const int ILLEGAL_VALUE = 8888888;
+static const int BC_WEIGHT = 3;
Engine::Engine(int st, int sd)/* : SuperEngine(st, sd) */
--- branches/work/kreversi_rewrite/Engine.h #575340:575341
@@ -234,11 +234,6 @@
void yield();
private:
- // FIXME dimsuz: do these needed outside Engine?
- // If not put them as static globals in cpp
- static const int LARGEINT;
- static const int ILLEGAL_VALUE;
- static const int BC_WEIGHT;
ChipColor m_board[10][10];
int m_bc_board[9][9];
--- branches/work/kreversi_rewrite/kreversigame.cpp #575340:575341
@@ -43,8 +43,6 @@
// FIXME dimsuz: m_competitive. Read from config. What's this btw? :)
// (also there's computeMove in getHint)
KReversiMove move = m_engine->computeMove( *this, true );
- // FIXME dimsuz: if move.color != m_computerColor then this might mean that player already has won!
- // Check it!
Q_ASSERT(move.color == m_computerColor);
kDebug() << "Computer plays ("<<move.row<<","<<move.col<<")" <<endl;
makeMove(move);
--- branches/work/kreversi_rewrite/kreversiscene.cpp #575340:575341
@@ -133,8 +133,7 @@
else
{ // we're just showing hint to the user
m_hintChip->setVisible( !m_hintChip->isVisible() );
- // FIXME dimsuz: update only bounding rect!
- update();
+ update(m_hintChip->sceneBoundingRect());
}
}
@@ -267,8 +266,7 @@
m_animTimer->stop();
m_hintChip->hide();
m_showingHint = false;
- // FIXME dimsuz: update only m_hintChips bounding rect!
- update();
+ update(m_hintChip->sceneBoundingRect());
}
else // scene is animating move now...
kDebug() << "Don't you see I'm animating? Be patient, human child..." << endl;
--- branches/work/kreversi_rewrite/kreversiscene.h #575340:575341
@@ -19,7 +19,8 @@
* receives a mouse events, translates them so KReversiGame can understand,
* sends them to it,
* receives board-changed notifications, nicely animates them.
- * FIXME dimsuz: make this description more descriptive :)
+ * It also drives the gameflow, i.e. it tells KReversiGame when to make
+ * the next move.
*/
class KReversiScene : public QGraphicsScene
{
--- branches/work/kreversi_rewrite/mainwindow.cpp #575340:575341
@@ -74,7 +74,7 @@
{
// FIXME dimsuz: I'm removing "&" from text here, because
// there's a problem in KSelectAction ATM - text will contain a menu accell-ampersands
- // remove that .remove, after it is fixed
+ // remove that file.remove('&'), after this issue will be fixed in kdelibs
QString file = text + ".png";
file.remove('&');
QPixmap pix( KStandardDirs::locate("appdata", QString("pics/background/") + file ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic