public static Track GetTrackAt(this ITrackLayout trackLayout, int column, int row) { if (trackLayout.TryGet(column, row, out Track track)) { return(track); } return(null); }
public bool IsValid(int column, int row) => _trackLayout.TryGet(column, row, out _) && _gameBoard.GetMovableAt(column, row) == null;
public bool IsValid(int column, int row) => _trackLayout.TryGet(column, row, out _);
public bool IsValid(int column, int row) => _gameBoard.GetMovableAt(column, row) is Train || _trackLayout.TryGet(column, row, out _);