Move neighbour count to generation calculation

This commit is contained in:
Andrew Cooper
2022-09-09 07:57:51 +10:00
parent 3042247e06
commit 8994d9b03c
3 changed files with 21 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ internal static class IOExtensions
{
io.WriteLine("X,Y");
var values = io.Read2Numbers("&&&&&&\r");
if (Coordinates.TryCreate(values, out var coordinates) && board[coordinates] == 0)
if (Coordinates.TryCreate(values, out var coordinates) && board.IsEmptyAt(coordinates))
{
return coordinates;
}