mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
Move neighbour count to generation calculation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user