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
81674482
Commit
81674482
authored
Dec 13, 2015
by
ctrlaltca
Browse files
Merge pull request #1654 from ctrlaltca/facedown
Server-size fixes for card stacking
parents
0c137e8a
ea5666c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_cardzone.cpp
View file @
81674482
...
@@ -147,7 +147,12 @@ int Server_CardZone::getFreeGridColumn(int x, int y, const QString &cardName, bo
...
@@ -147,7 +147,12 @@ int Server_CardZone::getFreeGridColumn(int x, int y, const QString &cardName, bo
if
(
x
==
-
1
)
{
if
(
x
==
-
1
)
{
if
(
!
dontStackSameName
&&
freePilesMap
[
y
].
contains
(
cardName
))
{
if
(
!
dontStackSameName
&&
freePilesMap
[
y
].
contains
(
cardName
))
{
x
=
(
freePilesMap
[
y
].
value
(
cardName
)
/
3
)
*
3
;
x
=
(
freePilesMap
[
y
].
value
(
cardName
)
/
3
)
*
3
;
if
(
!
coordMap
.
contains
(
x
))
if
(
coordMap
.
contains
(
x
)
&&
(
coordMap
[
x
]
->
getFaceDown
()
||
!
coordMap
[
x
]
->
getAttachedCards
().
isEmpty
()))
{
// don't pile up on: 1. facedown cards 2. cards with attached cards
}
else
if
(
!
coordMap
.
contains
(
x
))
return
x
;
return
x
;
else
if
(
!
coordMap
.
contains
(
x
+
1
))
else
if
(
!
coordMap
.
contains
(
x
+
1
))
return
x
+
1
;
return
x
+
1
;
...
...
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