C# Class NeatTicTacToe.GameForm

Inheritance: System.Windows.Forms.Form
Mostra file Open project: tansey/sharpneat-tutorials

Public Methods

Method Description
GameForm ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnPaint ( PaintEventArgs e ) : void
OnResize ( EventArgs e ) : void

Private Methods

Method Description
GameForm_MouseClick ( object sender, MouseEventArgs e ) : void

Fills in the square that the human clicked on, gets the AI's response, and checks for a winner.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

endGame ( string message ) : void

Ends the game and displays a pop-up message to the player.

getComputerOpponentMove ( ) : void

Gets the next move from the AI.

loadGenomeFromFile ( bool readFunctionIds ) : void
loadHyperNEATPlayerToolStripMenuItem_Click ( object sender, EventArgs e ) : void
loadNEATPlayerToolStripMenuItem1_Click ( object sender, EventArgs e ) : void
neatPlayerToolStripMenuItem_Click ( object sender, EventArgs e ) : void
newGameToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Resets the board and starts a new game.

oToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Sets the human's square type to O and the AI's square type to X.

optimalPlayerToolStripMenuItem_Click ( object sender, EventArgs e ) : void
randomPlayerToolStripMenuItem_Click ( object sender, EventArgs e ) : void
xToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Sets the human's square type to X and the AI's square type to O.

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GameForm() public method

public GameForm ( ) : System
return System

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnResize() protected method

protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void