Skip to content

Instantly share code, notes, and snippets.

@gavilanch
Last active October 10, 2019 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavilanch/6614cb332592fde5f76a699cf5f831a3 to your computer and use it in GitHub Desktop.
Save gavilanch/6614cb332592fde5f76a699cf5f831a3 to your computer and use it in GitHub Desktop.
@code{
...
string resultadoMensaje;
string resultadoMensajeColor;
private void SeleccionarJugada(Jugada jugada)
{
timer.Stop();
var resultado = jugada.JugarContra(jugadaOponente);
if (resultado == EstatusJuego.Victoria)
{
resultadoMensaje = "Ganaste!";
resultadoMensajeColor = "green";
}
else if (resultado == EstatusJuego.Derrota)
{
resultadoMensaje = "Perdiste!";
resultadoMensajeColor = "red";
}
else
{
resultadoMensaje = "Empate!";
resultadoMensajeColor = "black";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment