diff options
Diffstat (limited to 'src/meeple.c')
-rw-r--r-- | src/meeple.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/meeple.c b/src/meeple.c index b9df686..ea70ec2 100644 --- a/src/meeple.c +++ b/src/meeple.c @@ -1,10 +1,13 @@ #include "meeple.h" +void initialize_available_meeples(int* available_meeples) { + for (int i = 0; i < PLAYERS; i++) available_meeples[i] = PLAYER_MEEPLES; +} + void refresh_meeple_map(BoardUnit* board, int* meeple_map) { for (int i = 0; i < MAX_STRUCTURES * PLAYERS; i++) meeple_map[i] = 0; - for (int i = 0; i < BOARD_UNITS; i++) { - if (board[i].meeple) { + for (int i = 0; i < BOARD_UNITS; i++) { if (board[i].meeple) { meeple_map[board[i].structure_group * PLAYERS + (board[i].meeple - 1)]++; } } @@ -34,3 +37,4 @@ int get_structure_dominator(int structure_group, int* meeple_map) { } return dominator; } + |