//In order for the TicTacToc board to inherit from the game board, we override the board clone, create a new board, //and then we also clone the squares from "this" board public override Board Clone() { Board b = new TTTBoard(); b.squares = (Player[, ]) this.squares.Clone(); return(b); }
public TicTacToe(TTTBoard tTTBoard) { //copy the reference of the buttons in Grid named grid to slots table tTTBoard.grid.Children.CopyTo(slots, 0); Initialize(); if (File.Exists(file) && MessageBox.Show("Do you want to continue the game?", "continuing", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { State(true); } }