Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
KReversi
Commits
e446c132
Commit
e446c132
authored
Jul 10, 2013
by
Denis Kuplyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up code
Deleted "if (true)" statement and useless comment. GIT_SILENT
parent
cc7e1b99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
kreversiview.h
kreversiview.h
+0
-3
mainwindow.cpp
mainwindow.cpp
+13
-15
No files found.
kreversiview.h
View file @
e446c132
...
...
@@ -144,9 +144,6 @@ public slots:
return
m_demoMode
;
}
private
slots
:
/**
* @brief slotGameMoveFinished
*/
void
slotGameMoveFinished
();
void
slotGameOver
();
void
slotComputerCantMove
();
...
...
mainwindow.cpp
View file @
e446c132
...
...
@@ -330,24 +330,22 @@ void KReversiMainWindow::slotMoveFinished()
void
KReversiMainWindow
::
slotUndo
()
{
if
(
true
)
{
//!m_scene->isBusy() )
// scene will automatically notice that it needs to update
int
numUndone
=
m_game
->
undo
();
// remove last numUndone items from historyView
for
(
int
i
=
0
;
i
<
numUndone
;
++
i
)
delete
m_historyView
->
takeItem
(
m_historyView
->
count
()
-
1
);
// scene will automatically notice that it needs to update
int
numUndone
=
m_game
->
undo
();
// remove last numUndone items from historyView
for
(
int
i
=
0
;
i
<
numUndone
;
++
i
)
delete
m_historyView
->
takeItem
(
m_historyView
->
count
()
-
1
);
QListWidgetItem
*
last
=
m_historyView
->
item
(
m_historyView
->
count
()
-
1
);
m_historyView
->
setCurrentItem
(
last
);
m_historyView
->
scrollToItem
(
last
);
QListWidgetItem
*
last
=
m_historyView
->
item
(
m_historyView
->
count
()
-
1
);
m_historyView
->
setCurrentItem
(
last
);
m_historyView
->
scrollToItem
(
last
);
updateScores
();
updateScores
();
m_undoAct
->
setEnabled
(
m_game
->
canUndo
());
// if the user hits undo after game is over
// let's give him a chance to ask for a hint ;)
m_hintAct
->
setEnabled
(
true
);
}
m_undoAct
->
setEnabled
(
m_game
->
canUndo
());
// if the user hits undo after game is over
// let's give him a chance to ask for a hint ;)
m_hintAct
->
setEnabled
(
true
);
}
void
KReversiMainWindow
::
slotHighscores
()
...
...
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