forked from bluemonkmn/Chess
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
|
||
TicTacToeForm f = new TicTacToeForm(); | ||
|
||
// Create the game players | ||
// Players can be either human or computer players | ||
// It does not matter which piece 'X' or 'O' player 1 or two have | ||
// but they must be different | ||
|
||
// Create a human player | ||
Player p1 = new HumanPlayer("Joe", Board.Pieces.X, f); | ||
|
||
// Create a computer player | ||
// You can create varying degrees of difficulty by creating computer | ||
// players that build bigger game trees | ||
// uncomment desired player and comment all other player 2s | ||
|
||
// create a computer player with the default game tree search depth | ||
Player p2 = new ComputerPlayer("HAL", Board.Pieces.O); | ||
|
||
// Create a computer player that only looks ahead 1 move | ||
// i.e only considers their immediate move and not any subsequent moves | ||
// by their opponent. | ||
// this is a very poor player | ||
// Player p2 = new ComputerPlayer(Board.Pieces.X, f, 1); | ||
|
||
// Creates an advanced computer player that looks ahead 5 moves | ||
// Player p2 = new ComputerPlayer("Advanced HAL", Board.Pieces.X, 5); | ||
|
||
f.AddPlayer(p1); | ||
f.AddPlayer(p2); | ||
|
||
Application.Run(f); | ||
|
||
} | ||
} |