Esempio n. 1
0
 /// <summary>
 /// Create a new node.
 /// </summary>
 /// <param name="p_WhoseTurnItIs"> Whose turn it is to play. </param>
 /// <param name="p_Grid"> The current grid. </param>
 /// <param name="p_ColumnPlayed"> In which column we played to reach this node. </param>
 /// <param name="m_depth"> The depth of the node. </param>
 public Node(Connect4Player p_WhoseTurnItIs, GameGrid p_Grid, int p_ColumnPlayed, int m_depth)
 {
     m_WhoseTurnItIs      = p_WhoseTurnItIs;
     m_Grid               = p_Grid;
     m_TokenAddedInColumn = p_ColumnPlayed;
     m_Depth              = m_depth;
 }
Esempio n. 2
0
 /// <summary>
 /// Create a new AI player with his token color, his opponent and his minimax depth.
 /// </summary>
 /// <param name="p_TokenColor"> The color of the AIPlayer's token. </param>
 /// <param name="p_Opponent"> The opponent a.k.a. minimizing player. </param>
 /// <param name="p_DepthMinimax"> The depth for minimax. </param>
 public AIPlayer(string p_TokenColor, Connect4Player p_Opponent, int p_DepthMinimax) : base(p_TokenColor)
 {
     m_Opponent   = p_Opponent;
     m_TokenColor = p_TokenColor;
     m_MaxDepth   = p_DepthMinimax;
 }