public static void Main()
Console.WriteLine("Hello World");
public class MyGameState: GameState<char>
public MyGameState(): base(9, 3) {}
protected override void InitializeItems()
for(int i = 0; i < TotalCount; i++)
var item = new SelectableItem<char>
public abstract class GameState<TItemType>
public GameState(int rowCount, int colCount)
throw new ArgumentOutOfRangeException(nameof(rowCount), "rowCount cannot be less than one.");
throw new ArgumentOutOfRangeException(nameof(colCount), "colCount cannot be less than one.");
Items = new SelectableItem<TItemType>[RowCount * ColCount];
public int RowCount { get; }
public int ColCount { get; }
public int TotalCount => RowCount * ColCount;
public SelectableItem<TItemType>[] Items { get; }
protected abstract void InitializeItems();
public class SelectableItem<TItemData>
public TItemData Data { get; set; }
public bool IsSelected { get; set; }