diff --git a/src/gamestate.cpp b/src/gamestate.cpp index a36c6b2..9fe3e6e 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp @@ -451,8 +451,10 @@ QString GameState::generateStateHash() const { stateHash += slot->isRevealed() ? "t" : "f"; stateHash += ","; } - stateHash.removeLast(); - stateHash += " "; + + if (stateHash.last(1) != "|") + stateHash.removeLast(); + stateHash += "|"; } stateHash.removeLast(); @@ -462,8 +464,9 @@ QString GameState::generateStateHash() const { for (const PlayingCard* card : foundationPile) { stateHash += QString::number(card->value()) + "." + QString::number(card->suit()) + ","; } - stateHash.removeLast(); - stateHash += " "; + if (stateHash.last(1) != "|") + stateHash.removeLast(); + stateHash += "|"; } stateHash.removeLast();