-
-
Save parzibyte/0579552aea735f1a3b820d3e837998fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string obtenerRepresentacionMina(int x, int y) | |
{ | |
Celda c = this->contenido.at(y).at(x); | |
if (c.estaDescubierta() || this->modoProgramador) | |
{ | |
if (c.tieneMina()) | |
{ | |
return "*"; | |
} | |
else | |
{ | |
int cantidad = this->minasCercanas(y, x); | |
string cantidadComoCadena = ""; | |
stringstream ss; | |
ss << cantidad; | |
ss >> cantidadComoCadena; | |
return cantidadComoCadena; | |
} | |
} | |
else | |
{ | |
return "."; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment