Completed
This commit is contained in:
15
Box.cs
15
Box.cs
@@ -1,15 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TicTacToe
|
||||
namespace TicTacToe
|
||||
{
|
||||
public class Box
|
||||
{
|
||||
public Action<int> Pressed;
|
||||
public Action<int>? Pressed;
|
||||
public int Index;
|
||||
public bool BotOwned = false;
|
||||
private Button _button;
|
||||
@@ -23,9 +16,9 @@ namespace TicTacToe
|
||||
_button.Text = "";
|
||||
}
|
||||
|
||||
private void Clicked(object sender, EventArgs e)
|
||||
private void Clicked(object? sender, EventArgs e)
|
||||
{
|
||||
Pressed.Invoke(Index);
|
||||
Pressed?.Invoke(Index);
|
||||
}
|
||||
|
||||
public void Destroy()
|
||||
|
||||
Reference in New Issue
Block a user