Completed
This commit is contained in:
13
Program.cs
13
Program.cs
@@ -3,28 +3,33 @@ namespace TicTacToe
|
||||
public static class Program
|
||||
{
|
||||
public static Form1 form = new Form1();
|
||||
static Game game;
|
||||
static Game game = new Game();
|
||||
static int wins = 0;
|
||||
static int loses = 0;
|
||||
|
||||
static void Main()
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
game = new Game();
|
||||
game.Start();
|
||||
form.newGameToolStripMenuItem.Click += NewGame;
|
||||
form.exitToolStripMenuItem.Click += Exit;
|
||||
form.aboutToolStripMenuItem.Click += About;
|
||||
Application.Run(form);
|
||||
}
|
||||
|
||||
static void NewGame(object sender, EventArgs e)
|
||||
static void NewGame(object? sender, EventArgs e)
|
||||
{
|
||||
game.Destroy();
|
||||
game = new Game();
|
||||
game.Start();
|
||||
}
|
||||
|
||||
static void Exit(object sender, EventArgs e)
|
||||
static void About(object? sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Tic Tac Toe med motst<73>ndare, kodat av Max Westerlund");
|
||||
}
|
||||
|
||||
static void Exit(object? sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user