예제 #1
0
 public Minefield(IMovementFactory movementFactory, Tile[,] board, Mine[] mines, ExitPoint exitPoint, IDancer turtle)
 {
     this.movementFactory = movementFactory;
     this.board           = board;
     this.mines           = mines;
     this.exitPoint       = exitPoint;
     this.turtle          = turtle;
 }
예제 #2
0
        public Rover(IMapGrid mapGrid,
                     int startingX,
                     int startingY,
                     OrientationEnum startingOrientation,
                     IMovementFactory movementFactory)
        {
            if (!mapGrid.IsValid(startingX, startingY))
            {
                throw new Exception("The starting coordinates are not valid");
            }

            _mapGrid         = mapGrid;
            _movementFactory = movementFactory;
            X           = startingX;
            Y           = startingY;
            Orientation = startingOrientation;
        }
예제 #3
0
 public RoversManager(IMapGrid mapGrid, IMovementFactory movementFactory)
 {
     _mapGrid         = mapGrid;
     _movementFactory = movementFactory;
 }