Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
KReversi
Commits
8109a814
Commit
8109a814
authored
Jan 28, 2014
by
Inge Wallin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Disable all kDebug()'s"
This reverts commit
633a121e
.
parent
59d599bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
15 deletions
+13
-15
Engine.cpp
Engine.cpp
+1
-1
kreversigame.cpp
kreversigame.cpp
+6
-4
kreversiview.cpp
kreversiview.cpp
+5
-9
mainwindow.cpp
mainwindow.cpp
+1
-1
No files found.
Engine.cpp
View file @
8109a814
...
...
@@ -302,7 +302,7 @@ KReversiPos Engine::computeMove(const KReversiGame& game, bool competitive)
{
if
(
m_computingMove
)
{
//
kDebug() << "I'm already computing move! Yours KReversi Engine.";
kDebug
()
<<
"I'm already computing move! Yours KReversi Engine."
;
return
KReversiPos
();
}
m_computingMove
=
true
;
...
...
kreversigame.cpp
View file @
8109a814
...
...
@@ -63,8 +63,10 @@ void KReversiGame::makePlayerMove( int row, int col, bool demoMode )
if
(
!
isMovePossible
(
move
)
)
{
kDebug
()
<<
"No move possible"
;
return
;
}
//kDebug() << "Black (player) play ("<<move.row<<","<<move.col<<")";
makeMove
(
move
);
m_undoStack
.
push
(
m_changedChips
);
}
...
...
@@ -85,7 +87,7 @@ void KReversiGame::startNextTurn(bool demoMode)
}
else
// no comp move possible and not in demo mode
{
//
kDebug() << "Computer can't move!";
kDebug
()
<<
"Computer can't move!"
;
m_curPlayer
=
m_playerColor
;
emit
computerCantMove
();
}
...
...
@@ -106,7 +108,7 @@ void KReversiGame::startNextTurn(bool demoMode)
}
else
{
//
kDebug() << "GAME OVER";
kDebug
()
<<
"GAME OVER"
;
emit
gameOver
();
}
}
...
...
@@ -122,7 +124,7 @@ void KReversiGame::makeComputerMove()
if
(
move
.
color
!=
m_computerColor
)
{
//
kDebug() << "Strange! makeComputerMove() just got not computer move!";
kDebug
()
<<
"Strange! makeComputerMove() just got not computer move!"
;
return
;
}
...
...
@@ -171,7 +173,7 @@ int KReversiGame::undo()
m_curPlayer
=
m_playerColor
;
//
kDebug() << "Undone" << movesUndone << "moves.";
kDebug
()
<<
"Undone"
<<
movesUndone
<<
"moves."
;
//kDebug() << "Current player changed to" << (m_curPlayer == White ? "White" : "Black" );
if
(
!
m_undoStack
.
empty
())
...
...
kreversiview.cpp
View file @
8109a814
...
...
@@ -19,15 +19,10 @@
#include "kreversiview.h"
KReversiView
::
KReversiView
(
KReversiGame
*
game
,
QWidget
*
parent
)
:
KgDeclarativeView
(
parent
)
,
m_delay
(
ANIMATION_SPEED_NORMAL
)
,
m_game
(
0
)
,
m_demoMode
(
false
)
,
m_showLastMove
(
false
)
,
m_showLegalMoves
(
false
)
,
m_showLabels
(
false
)
,
m_maxDelay
(
0
)
KReversiView
::
KReversiView
(
KReversiGame
*
game
,
QWidget
*
parent
)
:
KgDeclarativeView
(
parent
),
m_delay
(
ANIMATION_SPEED_NORMAL
),
m_game
(
0
),
m_demoMode
(
false
),
m_showLastMove
(
false
),
m_showLegalMoves
(
false
),
m_showLabels
(
false
),
m_maxDelay
(
0
)
{
m_delayTimer
.
setSingleShot
(
true
);
connect
(
&
m_delayTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
slotOnDelay
()));
...
...
@@ -73,6 +68,7 @@ void KReversiView::setGame(KReversiGame *game)
connect
(
m_game
,
SIGNAL
(
playerCantMove
()),
this
,
SLOT
(
slotPlayerCantMove
()));
}
m_hint
=
KReversiPos
();
m_demoMode
=
false
;
...
...
mainwindow.cpp
View file @
8109a814
...
...
@@ -355,7 +355,7 @@ void KReversiMainWindow::slotHighscores()
void
KReversiMainWindow
::
showEvent
(
QShowEvent
*
)
{
if
(
m_firstShow
&&
m_startInDemoMode
)
{
//
kDebug() << "starting demo...";
kDebug
()
<<
"starting demo..."
;
slotToggleDemoMode
();
}
m_firstShow
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment