fix battleships
This commit is contained in:
parent
54d12f1e86
commit
a1ce9d4b7a
|
@ -232,7 +232,7 @@ void update_state(struct state * state, struct position pos) {
|
|||
int letter_count = 0;
|
||||
for (int x = 0; x < BOARD_SIZE; ++x) {
|
||||
for (int y = 0; y < BOARD_SIZE; ++y) {
|
||||
if (isalpha(state->board[pos.y][pos.x])) {
|
||||
if (isalpha(state->board[y][x])) {
|
||||
letter_count += 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue