Skip to content

Instantly share code, notes, and snippets.



Created Jun 8, 2020
What would you like to do?
// Coloca una mina en las coordenadas indicadas
void colocarMina(int fila, int columna, char tablero[FILAS][COLUMNAS]) {
tablero[fila][columna] = MINA;
// Coloca minas de manera aleatoria. El número depende de CANTIDAD_MINAS
void colocarMinasAleatoriamente(char tablero[FILAS][COLUMNAS]) {
int l;
for (l = 0; l < CANTIDAD_MINAS; l++) {
int fila = aleatorioEnRango(0, FILAS - 1);
int columna = aleatorioEnRango(0, COLUMNAS - 1);
colocarMina(fila, columna, tablero);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment