Skip to content

Instantly share code, notes, and snippets.

@amhed
Last active December 28, 2015 08:58
Show Gist options
  • Save amhed/7475019 to your computer and use it in GitHub Desktop.
Save amhed/7475019 to your computer and use it in GitHub Desktop.
public void FichasRepartidasAJugadoresDebenSerBarajadas()
{
var probabilidad = 1m/28m;
int cantidadCajitas = 0;
for (int i = 0; i < 100; i++)
{
var juego = new JuegoDomino();
if (juego.Jugadores[0].Fichas[0].Equals(new Ficha(0, 0)))
{
cantidadCajitas++;
}
}
var probabilidadObtenida = cantidadCajitas/100m;
Assert.IsTrue(probabilidadObtenida <= probabilidad);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment