Merge pull request #1654 from ctrlaltca/facedown
Server-size fixes for card stacking
This commit is contained in:
commit
8167448284
1 changed files with 6 additions and 1 deletions
|
@ -147,7 +147,12 @@ int Server_CardZone::getFreeGridColumn(int x, int y, const QString &cardName, bo
|
|||
if (x == -1) {
|
||||
if (!dontStackSameName && freePilesMap[y].contains(cardName)) {
|
||||
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;
|
||||
else if (!coordMap.contains(x + 1))
|
||||
return x + 1;
|
||||
|
|
Loading…
Reference in a new issue