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
2048
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
2048
Commits
8643091e
Commit
8643091e
authored
Jul 29, 2020
by
Arnaud B.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug.
parent
ac7ae165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/game.vala
src/game.vala
+7
-7
No files found.
src/game.vala
View file @
8643091e
...
...
@@ -442,10 +442,10 @@ private class Game : Gtk.Widget
{
debug
(
@"prepare move tile from $from to $to"
);
bool
row_move
=
(
from
.
col
==
to
.
col
);
//
bool row_move = (from.col == to.col);
RoundedRectangle
rect_from
=
_background
[
from
.
col
,
from
.
row
];
RoundedRectangle
rect_to
=
_background
[
to
.
col
,
to
.
row
];
//
RoundedRectangle rect_from = _background [from.col, from.row];
//
RoundedRectangle rect_to = _background [ to.col, to.row];
// TileView? tile_view = _foreground_cur [from.col, from.row];
// if (tile_view == null)
...
...
@@ -609,17 +609,17 @@ private class Game : Gtk.Widget
_grid
.
move
(
request
,
ref
_to_move
,
ref
_to_hide
,
ref
_to_show
);
foreach
(
TileMovement
?
e
in
_to_
mov
e
)
foreach
(
TileMovement
?
e
in
_to_
hid
e
)
{
if
(
e
==
null
)
assert_not_reached
();
_move_tile
(((!)
e
).
from
,
((!)
e
).
to
);
_
prepare_
move_tile
(((!)
e
).
from
,
((!)
e
).
to
);
}
foreach
(
TileMovement
?
e
in
_to_
hid
e
)
foreach
(
TileMovement
?
e
in
_to_
mov
e
)
{
if
(
e
==
null
)
assert_not_reached
();
_
prepare_
move_tile
(((!)
e
).
from
,
((!)
e
).
to
);
_move_tile
(((!)
e
).
from
,
((!)
e
).
to
);
}
if
((
_to_move
.
size
>
0
)
||
(
_to_hide
.
size
>
0
)
||
(
_to_show
.
size
>
0
))
...
...
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