[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kttt/src
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2003-09-02 18:46:46
[Download RAW message or body]
CVS commit by aacid:
Please annma, at the beginnig there's already a game started, no need to start a new \
one. Some bugfixing and code change.
M +12 -1 board.cpp 1.2
M +0 -6 boardwidget.cpp 1.2
M +0 -1 kttt.cpp 1.2
--- kdenonbeta/kttt/src/board.cpp #1.1:1.2
@@ -17,5 +17,13 @@
board::board(bool createKcases)
{
- currentPlayer = kcase::NOBODY;
+ KConfig *conf = kapp -> config();
+ conf -> setGroup("general");
+ currentMode = static_cast<MODE>(conf -> readNumEntry("game_mode", CLASSIC));
+ player1 = static_cast<PLAYER>(conf -> readNumEntry("player1", HUMAN));
+ player2 = static_cast<PLAYER>(conf -> readNumEntry("player2", HUMAN));
+
+ currentPlayer = kcase::PLAYER1;
+ player1PiecesLeft = 3;
+ player2PiecesLeft = 3;
selected = false;
selected_x = -1;
@@ -38,4 +46,7 @@ void board::newGame()
player1PiecesLeft = 3;
player2PiecesLeft = 3;
+ selected = false;
+ selected_x = -1;
+ selected_y = -1;
for (int i = 0; i < 3; i++)
--- kdenonbeta/kttt/src/boardwidget.cpp #1.1:1.2
@@ -24,10 +24,4 @@ boardWidget::boardWidget(QWidget *parent
}
}
-
- KConfig *conf = kapp -> config();
- conf -> setGroup("general");
- currentMode = static_cast<MODE>(conf -> readNumEntry("game_mode", CLASSIC));
- player1 = static_cast<PLAYER>(conf -> readNumEntry("player1", HUMAN));
- player2 = static_cast<PLAYER>(conf -> readNumEntry("player2", HUMAN));
}
--- kdenonbeta/kttt/src/kttt.cpp #1.1:1.2
@@ -29,5 +29,4 @@ kttt::kttt() : KMainWindow(0, "kttt")
show();
connect(p_board, SIGNAL(statusBarMessage(const QString&)), statusBar(), \
SLOT(message(const QString&)));
- statusBar() -> message(i18n("Press Game -> New to start a new game."));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic