C# Class NeatTicTacToe.GameForm

Inheritance: System.Windows.Forms.Form
Afficher le fichier Open project: tansey/sharpneat-tutorials

Méthodes publiques

Méthode Description
GameForm ( ) : System

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

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

Private Methods

Méthode 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 méthode

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

GameForm() public méthode

public GameForm ( ) : System
Résultat System

OnPaint() protected méthode

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnResize() protected méthode

protected OnResize ( EventArgs e ) : void
e System.EventArgs
Résultat void