simplify deck parsing function
This commit is contained in:
parent
426807f730
commit
95365a8a68
1 changed files with 1 additions and 2 deletions
|
@ -64,8 +64,7 @@ namespace Hanabi {
|
|||
|
||||
std::vector<Hanabi::Card> parse_deck(const boost::json::value& deck_json) {
|
||||
auto deck = boost::json::value_to<std::vector<Hanabi::Card>>(deck_json);
|
||||
for(size_t i = 0; i < deck.size(); i++) {
|
||||
auto &card = deck[i];
|
||||
for(auto & card : deck) {
|
||||
assert(card.rank < 5);
|
||||
assert(card.rank >= 0);
|
||||
assert(card.suit < 6);
|
||||
|
|
Loading…
Reference in a new issue