//StishBoard public BoardState(StishBoard CurrentBoard) { this.boardSize.X = CurrentBoard.BoardSizeX; this.boardSize.Y = CurrentBoard.BoardSizeY; this.player1 = new Human(CurrentBoard.Player1); m_BoardState = new Square[CurrentBoard.BoardSizeX, CurrentBoard.BoardSizeY]; Coordinate Here = new Coordinate(); if (CurrentBoard.Player2.GetPlayerType == "Human") { this.player2 = new Human(CurrentBoard.Player2); for (uint y = 0; y < CurrentBoard.BoardSizeY; y++) { for (uint x = 0; x < CurrentBoard.BoardSizeX; x++) { Here.Y = y; Here.X = x; m_BoardState[x, y] = new Square(CurrentBoard.getSquare(Here), (Human)this.player1, (Human)this.player2); } } } else { this.player2 = new Computer((Computer)CurrentBoard.Player2); for (uint y = 0; y < CurrentBoard.BoardSizeY; y++) { for (uint x = 0; x < CurrentBoard.BoardSizeX; x++) { Here.Y = y; Here.X = x; m_BoardState[x, y] = new Square(CurrentBoard.getSquare(Here), (Human)this.player1, (Computer)this.player2); } } } }
//private BoardState m_boardState; //need to re-work the arguments as we cant just pass through the current state, we need to add the next possible states. protected MiniMaxNode(TreeNode Parent, StishBoard CurrentBoard) : base(Parent) { //m_boardState = CurrentBoard.GetBoardState(); }