You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sae201_qwirkle/Qwirkle/QwirkleClassLibrary/Cell.cs

50 lines
740 B

// 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;
}
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;
return true;
}
else
{
return false;
}
}
}