This repository has been archived on 2022-03-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
minesweeper/Cell.cs
T
2022-03-03 00:43:36 +03:00

30 lines
690 B
C#

namespace MineSweeper
{
internal class Cell
{
public string value = " ";
public bool isMine = false;
public bool isMarked = false;
public Cell(bool mine)
{
if (mine)
{
isMine = true;
value = "¤";
}
}
public string show()
{
if (isMarked)
return "X";
else
return value;
}
public void setMine() { isMine = true; }
public void mark() { isMarked = true; }
public void unmark() { isMarked = false; }
public bool isEmpty() { return value == " "; }
}
}