mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 15:43:54 -07:00
update comments
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
parent
6b72b15027
commit
0433cc641b
2 changed files with 6 additions and 5 deletions
|
|
@ -244,10 +244,11 @@ static bool shouldBeFromTheBottom(const Server_CardZone *startZone, const std::s
|
|||
|
||||
int movedCount = static_cast<int>(cardsToMove.size());
|
||||
int tailStart = startZone->getCards().size() - movedCount;
|
||||
if (tailStart <= 0) { // if the move includes the start of the deck, it should not be considered from the bottom
|
||||
if (tailStart <= 0) { // if the entire deck is moved it should not be considered from the bottom
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if the move is a contiguous block at the end of the deck, fail fast when not
|
||||
int expectedPosition = tailStart;
|
||||
for (const auto &card : cardsToMove) {
|
||||
if (card.position != expectedPosition) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue