// ReSharper disable All using System.Runtime.CompilerServices; namespace QwirkleClassLibrary; public class Cell { private readonly int x; private readonly int y; private Tile? tile = null; public Cell(int x, int y) { if (x < 0 || y < 0) { throw new ArgumentException(x.ToString() + y.ToString()); } this.x = x; this.y = y; } public int GetX { get { return x; } } public int GetY { get { return y; } } public bool IsFree { get { return tile == null; } } public Tile? GetTile { get { return tile; } } public bool SetTile(Tile addedTile) { if(this.tile == null) { tile = addedTile; return true; } else { return false; } } }