/// <summary> /// Push all the information for the undo functionnality. /// </summary> public void PushCurrentTurnForUndo() { // Deap copy of array int[,] copy = BoardGame.DeepCopyIntArray(BoardGame.CurrentBoard); // Players time Tuple <TimeSpan, TimeSpan> playersTime = new Tuple <TimeSpan, TimeSpan>(BoardGame.PlayerWhite.Time, BoardGame.PlayerBlack.Time); // Players score Tuple <int, int> playersScore = new Tuple <int, int>(BoardGame.PlayerWhite.Score, BoardGame.PlayerBlack.Score); // Store all infos PreviousTurns.Push(new Tuple <int[, ], bool, Tuple <TimeSpan, TimeSpan>, Tuple <int, int> >(copy, WhiteTurn, playersTime, playersScore)); }