Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
325e240d
Commit
325e240d
authored
May 06, 2015
by
poixen
Browse files
Merge pull request #1044 from poixen/reveal_bug
Fixed revealing top card bug
parents
cf24f4aa
33fa3ae0
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_player.cpp
View file @
325e240d
...
...
@@ -369,12 +369,15 @@ Response::ResponseCode Server_Player::moveCard(GameEventStorage &ges, Server_Car
if
(
cardsToMove
.
isEmpty
())
return
Response
::
RespContextError
;
MoveCardCompareFunctor
cmp
(
startzone
==
targetzone
?
-
1
:
x
);
// 0 performs no sorting
// 1 reverses the sorting
MoveCardCompareFunctor
cmp
(
0
);
qSort
(
cardsToMove
.
begin
(),
cardsToMove
.
end
(),
cmp
);
bool
secondHalf
=
false
;
int
xIndex
=
-
1
;
for
(
int
cardIndex
=
0
;
cardIndex
<
cardsToMove
.
size
();
++
cardIndex
)
{
for
(
int
cardIndex
=
cardsToMove
.
size
()
-
1
;
cardIndex
>
-
1
;
--
cardIndex
)
{
Server_Card
*
card
=
cardsToMove
[
cardIndex
].
first
;
const
CardToMove
*
thisCardProperties
=
cardProperties
.
value
(
card
);
bool
faceDown
=
thisCardProperties
->
has_face_down
()
?
thisCardProperties
->
face_down
()
:
card
->
getFaceDown
();
...
...
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