diff options
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -23,6 +23,8 @@ int is_center_index(int index) { } int is_allowed_placement(char* tile, int index, char* board) { + if (board[index] != EMPTY) return 0; + for (int i = 0; i < 4; i++) { char neighbor = board[index + neighbor_increments[i]]; if (neighbor != EMPTY && neighbor != tile[i + 1]) return 0; |