From 0981739c866fa850e01ed75ab51d8953de93f747 Mon Sep 17 00:00:00 2001 From: Grigory Ustinov Date: Fri, 23 Feb 2018 18:52:43 +0300 Subject: [PATCH] Replace magic numbers by defined names --- src/game.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game.c b/src/game.c index c22e3ec..f996e55 100644 --- a/src/game.c +++ b/src/game.c @@ -129,7 +129,6 @@ void move_block(struct stack **origin, struct stack **destination, int block_siz stack_free(tmp); } - static void fill_deck(struct deck *deck) { struct card *card[NUMBER_OF_CARDS]; @@ -166,10 +165,10 @@ static void shuffle_deck(struct deck *deck) { } static void deal_cards(struct deck *deck) { - for (int i = 0; i < 7; i++) { + for (int i = 0; i < MANEUVRE_STACKS_NUMBER; i++) { move_card(&(deck->stock), &(deck->maneuvre[i])); card_expose(deck->maneuvre[i]->card); - for (int j = i + 1; j < 7; j++) { + for (int j = i + 1; j < MANEUVRE_STACKS_NUMBER; j++) { move_card(&(deck->stock), &(deck->maneuvre[j])); } }