We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6aec059 commit caf29deCopy full SHA for caf29de
code/applications/mines.c
@@ -144,9 +144,8 @@ static void show_game_state(struct MinesGameState *state) {
144
draw_grid();
145
for (uint8_t cell_y=0; cell_y < GRID_Y; cell_y++){
146
for (uint8_t cell_x=0; cell_x < GRID_X; cell_x++){
147
- if (bitmatrix_get(state->flagged, cell_x, cell_y)
148
- || (state->game_phase == m_END
149
- && bitmatrix_get(state->mines, cell_x, cell_y))) {
+ if ((state->game_phase != m_END && bitmatrix_get(state->flagged, cell_x, cell_y))
+ || (state->game_phase == m_END && bitmatrix_get(state->mines, cell_x, cell_y))) {
150
draw_mine(cell_x, cell_y);
151
} else if (state->game_phase != m_END && !bitmatrix_get(state->revealed, cell_x, cell_y)) {
152
draw_hidden_cell(cell_x, cell_y);
0 commit comments