// ReSharper disable All using System.Runtime.CompilerServices; namespace QwirkleClassLibrary; public class Cell { private int x; private int y; private Tile? tile = null; public Cell(int x, int y) { this.x = x; this.y = y; Console.WriteLine("Cell (" + x + ", " + y + ") created"); } 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(tile == null) { tile = addedTile; Console.WriteLine("The tile of shape " + addedTile.GetShape + " and color " + addedTile.GetColor + " has correctly been added to the cell of coordinates x = " + this.x + ", y = " + this.y); return true; } else { Console.WriteLine("There already is a tile in this cell !!"); return false; } } }