Examples of Ship


Examples of com.riley.angrymasons.Model.Ship

  Bullet b;
  Enemy e;
 
  public World (AngryMasons game){
    this.game = game;
    ship = new Ship(new Vector2(5, 5), 1, 1, 0, 5f);
    enemies.add(new Follower(5f, 0, 1, 1, new Vector2(10, 10)));
    Gdx.input.setInputProcessor(new InputHandler(this));
  }
View Full Code Here

Examples of com.riley.angrymasons.Model.Ship

  Ship ship;
  Follower follower;
 
  public World (AngryMasons game){
    this.game = game;
    ship = new Ship(new Vector2(5, 5), 1, 1, 0, 5f);
    follower = new Follower(5f, 0, 1, 1, new Vector2(10, 10));
    Gdx.input.setInputProcessor(new InputHandler(this));
  }
View Full Code Here

Examples of entities.ship.Ship

            }
        }

        ships = new ArrayList<Ship>();
        // Initialize ships without position.
        ships.add(new Ship(ShipType.Battleship, 5));
        ships.add(new Ship(ShipType.Cruiser, 4));
        ships.add(new Ship(ShipType.Cruiser, 4));
        ships.add(new Ship(ShipType.Destroyer, 3));
        ships.add(new Ship(ShipType.Destroyer, 3));
        ships.add(new Ship(ShipType.Destroyer, 3));
        ships.add(new Ship(ShipType.Submarine, 2));
        ships.add(new Ship(ShipType.Submarine, 2));
        ships.add(new Ship(ShipType.Submarine, 2));

        if (Randomizer.nextInt(10) == 8)
            ships.add(new Ship(ShipType.YellowSubmarine, 2));
        else
            ships.add(new Ship(ShipType.Submarine, 2));

        if (Const.DEBUG)
        {
            for (Ship ship : ships)
                System.out.printf(ship.Type.toString() + " - " + ship.Length + " - " + ship.Position + "\n");
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

  public void addShipTest() {
   
    Client c = Client.create();
    WebResource r = c.resource("http://localhost:8080/BattleShip/rest/game/addship/1802");
   
    Ship ship = new Ship();
    ArrayList<Cell> cells = new ArrayList<Cell>();
    ship.setCells(cells);
   
    ArrayList<Ship> ships = new ArrayList<Ship>();
    ships.add(ship);
   
    ArrayShip arrayShip = new ArrayShip();
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

    Cell cell5 = new Cell();
    cell5.setX(9);
    cell5.setY(5);
    cells.add(cell5);
    
    Ship ship1 = new Ship();
    ship1.setShipConfig(shipConfig1);
    ship1.setCells(cells);
   
    ships.add(ship1);
   
   
    cells = new ArrayList<Cell>();
    Cell cell6 = new Cell();
    cell6.setX(7);
    cell6.setY(4);
    cells.add(cell6);
   
   
    Cell cell7 = new Cell();
    cell7.setX(7);
    cell7.setY(5);
    cells.add(cell7);

    Cell cell8 = new Cell();
    cell8.setX(7);
    cell8.setY(6);
    cells.add(cell8);

    Cell cell9 = new Cell();
    cell9.setX(7);
    cell9.setY(7);
    cells.add(cell9);
   
    
    Ship ship2 = new Ship();
    ship2.setShipConfig(shipConfig2);
    ship2.setCells(cells);
   
    ships.add(ship2);


    cells = new ArrayList<Cell>();
   
   
    Cell cell11 = new Cell();
    cell11.setX(2);
    cell11.setY(6);
    cells.add(cell11);

    Cell cell12 = new Cell();
    cell12.setX(3);
    cell12.setY(6);
    cells.add(cell12);

    Cell cell13 = new Cell();
    cell13.setX(4);
    cell13.setY(6);
    cells.add(cell13);

    Ship ship3 = new Ship();
    ship3.setShipConfig(shipConfig3);
    ship3.setCells(cells);
   
    ships.add(ship3);
   

   
    cells = new ArrayList<Cell>();
    Cell cell14 = new Cell();
    cell14.setX(1);
    cell14.setY(1);
    cells.add(cell14);
   
   
    Cell cell15 = new Cell();
    cell15.setX(1);
    cell15.setY(2);
    cells.add(cell15);

    Ship ship4 = new Ship();
    ship4.setShipConfig(shipConfig4);
    ship4.setCells(cells);
   
    ships.add(ship4);

    cells = new ArrayList<Cell>();
    Cell cell16 = new Cell();
    cell16.setX(3);
    cell16.setY(4);
    cells.add(cell16);
   
   
    Cell cell17 = new Cell();
    cell17.setX(4);
    cell17.setY(4);
    cells.add(cell17);

    Ship ship5 = new Ship();
    ship5.setShipConfig(shipConfig4);
    ship5.setCells(cells);
   
    ships.add(ship5);

   

    cells = new ArrayList<Cell>();
    Cell cell18 = new Cell();
    cell18.setX(3);
    cell18.setY(2);
    cells.add(cell18);
   

    Ship ship6 = new Ship();
    ship6.setShipConfig(shipConfig5);
    ship6.setCells(cells);
   
    ships.add(ship6);
   

    cells = new ArrayList<Cell>();
    Cell cell19 = new Cell();
    cell19.setX(1);
    cell19.setY(8);
    cells.add(cell19);
   
   

    Ship ship7 = new Ship();
    ship7.setShipConfig(shipConfig5);
    ship7.setCells(cells);
   
    ships.add(ship7);
   
   
   
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

    Cell cell5 = new Cell();
    cell5.setX(9);
    cell5.setY(5);
    cells.add(cell5);
    
    Ship ship1 = new Ship();
    ship1.setShipConfig(shipConfig1);
    ship1.setCells(cells);
   
    ships.add(ship1);
   
   
    cells = new ArrayList<Cell>();
    Cell cell6 = new Cell();
    cell6.setX(7);
    cell6.setY(4);
    cells.add(cell6);
   
   
    Cell cell7 = new Cell();
    cell7.setX(7);
    cell7.setY(5);
    cells.add(cell7);

    Cell cell8 = new Cell();
    cell8.setX(7);
    cell8.setY(6);
    cells.add(cell8);

    Cell cell9 = new Cell();
    cell9.setX(7);
    cell9.setY(7);
    cells.add(cell9);
   
    
    Ship ship2 = new Ship();
    ship2.setShipConfig(shipConfig2);
    ship2.setCells(cells);
   
    ships.add(ship2);


    cells = new ArrayList<Cell>();
   
   
    Cell cell11 = new Cell();
    cell11.setX(2);
    cell11.setY(6);
    cells.add(cell11);

    Cell cell12 = new Cell();
    cell12.setX(3);
    cell12.setY(6);
    cells.add(cell12);

    Cell cell13 = new Cell();
    cell13.setX(4);
    cell13.setY(6);
    cells.add(cell13);

    Ship ship3 = new Ship();
    ship3.setShipConfig(shipConfig3);
    ship3.setCells(cells);
   
    ships.add(ship3);
   

   
    cells = new ArrayList<Cell>();
    Cell cell14 = new Cell();
    cell14.setX(1);
    cell14.setY(1);
    cells.add(cell14);
   
   
    Cell cell15 = new Cell();
    cell15.setX(1);
    cell15.setY(2);
    cells.add(cell15);

    Ship ship4 = new Ship();
    ship4.setShipConfig(shipConfig4);
    ship4.setCells(cells);
   
    ships.add(ship4);

    cells = new ArrayList<Cell>();
    Cell cell16 = new Cell();
    cell16.setX(3);
    cell16.setY(4);
    cells.add(cell16);
   
   
    Cell cell17 = new Cell();
    cell17.setX(4);
    cell17.setY(4);
    cells.add(cell17);

    Ship ship5 = new Ship();
    ship5.setShipConfig(shipConfig4);
    ship5.setCells(cells);
   
    ships.add(ship5);

   

    cells = new ArrayList<Cell>();
    Cell cell18 = new Cell();
    cell18.setX(3);
    cell18.setY(2);
    cells.add(cell18);
   

    Ship ship6 = new Ship();
    ship6.setShipConfig(shipConfig5);
    ship6.setCells(cells);
   
    ships.add(ship6);
   

    cells = new ArrayList<Cell>();
    Cell cell19 = new Cell();
    cell19.setX(1);
    cell19.setY(8);
    cells.add(cell19);
   
   

    Ship ship7 = new Ship();
    ship7.setShipConfig(shipConfig5);
    ship7.setCells(cells);
   
    ships.add(ship7);
   
   
   
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

  @Test(expected=ShipExecption.class) public void isConfigOkNoCellsTest() throws ShipExecption {
    Config configService = new ConfigImpl();

    List<Cell> cells = new ArrayList<Cell>();
    
    Ship ship = new Ship();
    ship.setShipConfig(shipConfigs.get(0));
    ship.setCells(cells);
   
    Player player = new Player();
    player.setShips(new ArrayList<Ship>());
   
    configService.isValid(game, player,ship);
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

    cell1.setX(9);
    cell1.setY(1);
    cells.add(cell1);
   

    Ship ship = new Ship();
    ship.setId(1L);
    ship.setShipConfig(shipConfigs.get(0));
    ship.setCells(cells);
   
    Player player = new Player();
    player.setShips(new ArrayList<Ship>());
   
    configService.isValid(game, player,ship);
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

    Game game = new Game();
    game.setStatus(GameStatus.Configuring);
    game.setGameConfig(gameConfig);
    game.setPlayers(players);
   
    Ship ship = buildShip(shipConfigs.get(0), cellShip1);
    
   
    configService.isValid(game, player,ship);
  }
View Full Code Here

Examples of es.mahulo.battleship.model.Ship

    cell.setX(11);
    cell.setY(1);
    cells.add(cell);

    List<Ship> ships = new ArrayList<Ship>();
    Ship ship = new Ship();
    ship.setShipConfig(shipConfigs.get(0));
    ship.setCells(cells);
    ships.add(ship);
   
    Player player = new Player();
    player.setShips(new ArrayList<Ship>());
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.