public static bool Equals(Game g1, Game g2) { bool player1 = Player.Equals(g1.Player1, g2.Player1); bool player2 = Player.Equals(g1.Player2, g2.Player2); bool rounds = Round.Equals(g1.Rounds, g2.Rounds); bool current = Round.Equals(g1.Current, g2.Current); return(player1 && player2 && rounds && current); }
public static bool Equals(Round[] r1, Round[] r2) { bool result; int dim1 = r1.GetLength(0); int dim2 = r2.GetLength(0); //Si p1 et p2 n'ont pas la meme taille, on renvoie false if (dim1 != dim2) { return(false); } for (int i = 0; i < dim1; i++) { result = Round.Equals(r1 [i], r2 [i]); if (!result) { return(false); } } return(true); }