Esempio n. 1
0
        /// <summary>
        /// Iniitalises a new instance of the <see cref="Game"/> from another game.
        /// </summary>
        /// <param name="game">The game to clone.</param>
        public Game(Game game)
        {
            this.ToWin    = game.ToWin;
            this.Players  = game.Players;
            this.Grid     = new Grid(game.Grid.Length, game.Grid.Breadth);
            this.MoveList = new();

            foreach (char c in game.ToString())
            {
                this.Play(int.Parse(c.ToString()));
            }
        }