#include "board.h" void initialize_board(BoardUnit* board) { for (int i = 0; i < BOARD_UNITS; i++) { board[i].feature = EMPTY; board[i].meeple = 0; board[i].structure_group = 0; } } int is_center_index(int index) { return ((index / BOARD_ROW_UNITS) % 2 == 1) && ((index % BOARD_ROW_UNITS) % 2 == 1); } int translate_coordinate(int center_index) { return (2 * (center_index / BOARD_WIDTH) + 1) * (2 * BOARD_WIDTH + 1) + (2 * (center_index % BOARD_WIDTH) + 1); }