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
KShisen
Commits
c3d60926
Commit
c3d60926
authored
May 10, 2016
by
Frederik Schwarzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explanation to possibly confusing code.
parent
2bedc382
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/board.cpp
src/board.cpp
+4
-0
No files found.
src/board.cpp
View file @
c3d60926
...
...
@@ -222,6 +222,10 @@ void Board::applyGravity(TilePos const tilePos1, TilePos const tilePos2)
if
(
!
m_gravityFlag
)
{
return
;
}
// If both removed tiles are in the same column, we iterate over the same
// column twice but all ideas I had to prevent that from happening seemed
// more complex that living with that second iteration once in a while.
// Maybe later ... (schwarzer)
std
::
array
<
int
,
2
>
const
affectedColumns
=
{
tilePos1
.
x
(),
tilePos2
.
x
()};
for
(
auto
const
column
:
affectedColumns
)
{
int
rptr
=
yTiles
()
-
1
;
...
...
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