mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
20 lines
465 B
C#
20 lines
465 B
C#
namespace Hexapawn
|
|
{
|
|
// Represents the contents of a cell on the board
|
|
internal class Pawn
|
|
{
|
|
public static readonly Pawn Black = new('X');
|
|
public static readonly Pawn White = new('O');
|
|
public static readonly Pawn None = new('.');
|
|
|
|
private readonly char _symbol;
|
|
|
|
private Pawn(char symbol)
|
|
{
|
|
_symbol = symbol;
|
|
}
|
|
|
|
public override string ToString() => _symbol.ToString();
|
|
}
|
|
}
|