Ejemplo n.º 1
0
        public LightGameBoardDirector(IGameBoardBuilder builder)
        {
            _builder = builder;
            _redPositions = new List<Tuple<int, int>>(){new Tuple<int, int>(2, 9), new Tuple<int, int>(8, 10), new Tuple<int, int>(10, 7)};
            _bluePositions = new List<Tuple<int, int>>(){new Tuple<int, int>(1, 2), new Tuple<int, int>(5, 2), new Tuple<int, int>(9, 1)};

            _lifePosition = new Tuple<int, int>(7, 7);
            _weaponPosition = new Tuple<int, int>(3, 5);
        }
Ejemplo n.º 2
0
        public MediumGameBoardDirector(IGameBoardBuilder builder)
        {
            _builder      = builder;
            _redPositions = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 5), new Tuple <int, int>(2, 13), new Tuple <int, int>(4, 7)
            };

            _bluePositions = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(1, 1), new Tuple <int, int>(4, 11), new Tuple <int, int>(6, 4)
            };
            _walls = new List <Wall>()
            {
                new Wall {
                    X = 3, Y = 3
                }, new Wall {
                    X = 3, Y = 4
                }, new Wall {
                    X = 3, Y = 5
                },
                new Wall {
                    X = 10, Y = 4
                }, new Wall {
                    X = 10, Y = 5
                }, new Wall {
                    X = 10, Y = 6
                },
                new Wall {
                    X = 10, Y = 7
                }, new Wall {
                    X = 9, Y = 7
                }, new Wall {
                    X = 8, Y = 7
                },
                new Wall {
                    X = 8, Y = 12
                }, new Wall {
                    X = 11, Y = 11
                }
            };

            _lifePosition   = new Tuple <int, int>(7, 7);
            _weaponPosition = new Tuple <int, int>(3, 5);
        }
Ejemplo n.º 3
0
 public GameEngine(
     IGameBoardBuilder gameBoardBuilder,
     IGameRenderer gameRenderer,
     IGameActionReader gameActionReader,
     IShipBuilder shipBuilder,
     IShipPlacementService shipPlacementService,
     IShotService shotService,
     ILogger <GameEngine> logger
     )
 {
     _gameBoardBuilder     = gameBoardBuilder;
     _gameRenderer         = gameRenderer;
     _gameActionReader     = gameActionReader;
     _shipBuilder          = shipBuilder;
     _shipPlacementService = shipPlacementService;
     _shotService          = shotService;
     _logger = logger;
 }
Ejemplo n.º 4
0
 public Game(IGameBoardBuilder builder)
 {
     GameBoard = builder.Build(GameSettings.BOARD_HEIGHT, GameSettings.BOARD_WIDTH);
 }
Ejemplo n.º 5
0
        public HardGameBoardDirector(IGameBoardBuilder builder)
        {
            _builder      = builder;
            _redPositions = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(1, 9), new Tuple <int, int>(2, 1), new Tuple <int, int>(4, 8)
            };

            _bluePositions = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 4), new Tuple <int, int>(0, 12), new Tuple <int, int>(3, 6)
            };
            _walls = new List <Wall>()
            {
                new Wall {
                    X = 1, Y = 2
                }, new Wall {
                    X = 2, Y = 2
                }, new Wall {
                    X = 3, Y = 2
                },
                new Wall {
                    X = 3, Y = 1
                }, new Wall {
                    X = 7, Y = 3
                }, new Wall {
                    X = 8, Y = 5
                },
                new Wall {
                    X = 10, Y = 3
                }, new Wall {
                    X = 11, Y = 3
                }, new Wall {
                    X = 10, Y = 14
                },
                new Wall {
                    X = 5, Y = 15
                }, new Wall {
                    X = 6, Y = 15
                }, new Wall {
                    X = 6, Y = 16
                },
                new Wall {
                    X = 3, Y = 8
                }, new Wall {
                    X = 3, Y = 9
                }, new Wall {
                    X = 3, Y = 10
                },
                new Wall {
                    X = 3, Y = 11
                }, new Wall {
                    X = 3, Y = 12
                }, new Wall {
                    X = 3, Y = 13
                },
                new Wall {
                    X = 4, Y = 13
                }, new Wall {
                    X = 5, Y = 13
                }, new Wall {
                    X = 6, Y = 13
                },
                new Wall {
                    X = 7, Y = 13
                }
            };
            _lifePosition   = new Tuple <int, int>(7, 7);
            _weaponPosition = new Tuple <int, int>(3, 5);
        }