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