Completed

This commit is contained in:
maxwes08
2025-10-20 10:00:51 +02:00
parent 3fe7224aaf
commit cc5b6125bb
7 changed files with 129 additions and 50 deletions

View File

@@ -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();
}