Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KReversi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
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