Index

ncurses-minesweeper / d83acc5

Terminal game of Minesweeper, implemented in C with ncurses.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
2117 Sep 2020 21:34d83acc5Rewrite and finish game and renderer codeJosh Stockin1190G

Blob @ ncurses-minesweeper / src / game / kaboom.c

text/plain672 bytesdownload raw
1/* ncurses-minesweeper Copyright (c) 2020 Joshua 'joshuas3' Stockin
2 * <https://joshstock.in>
3 * <https://github.com/JoshuaS3/lognestmonster>
4 *
5 * This software is licensed and distributed under the terms of the MIT License.
6 * See the MIT License in the LICENSE file of this project's root folder.
7 *
8 * This comment block and its contents, including this disclaimer, MUST be
9 * preserved in all copies or distributions of this software's source.
10 */
11
12#include "../state.h"
13
14void kaboom(game_board *board) {
15 board->status = Kaboom;
16 for (int i = 0; i < board->width * board->height; i++) {
17 if (board->cells[i].is_bomb) board->cells[i].opened = 1;
18 }
19}
20