Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KReversi
Commits
eae9aceb
Commit
eae9aceb
authored
Jun 24, 2017
by
Andrius Štikonas
Browse files
Port away from Q_FOREACH.
parent
c6b4a4d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
eae9aceb
project
(
kreversi
)
cmake_minimum_required
(
VERSION 2.8.12 FATAL_ERROR
)
set
(
QT_MIN_VERSION
"5.
3
.0"
)
set
(
QT_MIN_VERSION
"5.
7
.0"
)
set
(
KF5_MIN_VERSION
"5.15.0"
)
find_package
(
ECM 1.7.0 REQUIRED NO_MODULE
)
...
...
kreversigame.cpp
View file @
eae9aceb
...
...
@@ -151,7 +151,7 @@ int KReversiGame::undo()
setChipColor
(
KReversiMove
(
NoColor
,
move
.
row
,
move
.
col
));
// and change back the color of the rest chips
for
each
(
const
KReversiMove
&
pos
,
lastUndo
)
{
for
(
const
KReversiMove
&
pos
:
qAsConst
(
lastUndo
)
)
{
ChipColor
opponentColor
=
Utils
::
opponentColorFor
(
m_cells
[
pos
.
row
][
pos
.
col
]);
setChipColor
(
KReversiMove
(
opponentColor
,
pos
.
row
,
pos
.
col
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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