BoardSquareState.cs 577 Bytes
Newer Older
Andres Käver's avatar
Andres Käver committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace BattleShipBrain
{
    public struct BoardSquareState
    {
        public bool IsShip { get; set; }
        public bool IsBomb { get; set; }

        public override string ToString()
        {
            switch (IsEmpty: IsShip, IsBomb)
            {
                case (false, false):
                    return " ";
                case (false, true):
                    return "-";
                case (true, false):
                    return "8";
                case (true, true):
                    return " *";
            }
        }
    }
    
    
}