Package es.mahulo.battleship.model

Examples of es.mahulo.battleship.model.ShipConfig


  private GameConfig gameConfig;
 
  public GameConfigDaoMock() {
    List<ShipConfig> shipConfigs = new ArrayList<ShipConfig>();

    ShipConfig shipConfig1 = new ShipConfig();
    shipConfig1.setId(1L);
    shipConfig1.setName("aircraft carrier");
    shipConfig1.setNumber(1);
    shipConfig1.setSize(5);
    shipConfigs.add(shipConfig1);
   
    ShipConfig shipConfig2 = new ShipConfig();
    shipConfig2.setId(2L);
    shipConfig2.setName("battleship");
    shipConfig2.setNumber(1);
    shipConfig2.setSize(4);
    shipConfigs.add(shipConfig2);

    ShipConfig shipConfig3 = new ShipConfig();
    shipConfig3.setId(3L);
    shipConfig3.setName("cruiser");
    shipConfig3.setNumber(1);
    shipConfig3.setSize(3);
    shipConfigs.add(shipConfig3);
   
    ShipConfig shipConfig4 = new ShipConfig();
    shipConfig4.setId(4L);
    shipConfig4.setName("destroyer");
    shipConfig4.setNumber(2);
    shipConfig4.setSize(2);
    shipConfigs.add(shipConfig4);
   
   
    ShipConfig shipConfig5 = new ShipConfig();
    shipConfig5.setId(5L);
    shipConfig5.setName("submarine");
    shipConfig5.setNumber(2);
    shipConfig5.setSize(1);
    shipConfigs.add(shipConfig5);
   
   
    gameConfig = new GameConfig();
    gameConfig.setDimensionX(10);
View Full Code Here


 
  public void configure1Test() {
   
   
    ShipConfig shipConfig1 = new ShipConfig();
    shipConfig1.setId(1L);
    shipConfig1.setName("aircraft carrier");
    shipConfig1.setNumber(1);
    shipConfig1.setSize(5);

   
    ShipConfig shipConfig2 = new ShipConfig();
    shipConfig2.setId(2L);
    shipConfig2.setName("battleship");
    shipConfig2.setNumber(1);
    shipConfig2.setSize(4);


    ShipConfig shipConfig3 = new ShipConfig();
    shipConfig3.setId(3L);
    shipConfig3.setName("cruiser");
    shipConfig3.setNumber(1);
    shipConfig3.setSize(3);

   
    ShipConfig shipConfig4 = new ShipConfig();
    shipConfig4.setId(4L);
    shipConfig4.setName("destroyer");
    shipConfig4.setNumber(2);
    shipConfig4.setSize(2);

   
   
    ShipConfig shipConfig5 = new ShipConfig();
    shipConfig5.setId(5L);
    shipConfig5.setName("submarine");
    shipConfig5.setNumber(2);
    shipConfig5.setSize(1);


   
    List<Ship> ships = new ArrayList<Ship>();
   
View Full Code Here

  }
 
  @Test public void configure2Test() {
   
   
    ShipConfig shipConfig1 = new ShipConfig();
    shipConfig1.setId(1L);
    shipConfig1.setName("aircraft carrier");
    shipConfig1.setNumber(1);
    shipConfig1.setSize(5);

   
    ShipConfig shipConfig2 = new ShipConfig();
    shipConfig2.setId(2L);
    shipConfig2.setName("battleship");
    shipConfig2.setNumber(1);
    shipConfig2.setSize(4);


    ShipConfig shipConfig3 = new ShipConfig();
    shipConfig3.setId(3L);
    shipConfig3.setName("cruiser");
    shipConfig3.setNumber(1);
    shipConfig3.setSize(3);

   
    ShipConfig shipConfig4 = new ShipConfig();
    shipConfig4.setId(4L);
    shipConfig4.setName("destroyer");
    shipConfig4.setNumber(2);
    shipConfig4.setSize(2);

   
   
    ShipConfig shipConfig5 = new ShipConfig();
    shipConfig5.setId(5L);
    shipConfig5.setName("submarine");
    shipConfig5.setNumber(2);
    shipConfig5.setSize(1);


   
    List<Ship> ships = new ArrayList<Ship>();
   
View Full Code Here

 
 
  @Before public void setUp() {
    shipConfigs = new ArrayList<ShipConfig>();

    ShipConfig shipConfig1 = new ShipConfig();
    shipConfig1.setId(1L);
    shipConfig1.setName("aircraft carrier");
    shipConfig1.setNumber(1);
    shipConfig1.setSize(5);
    shipConfigs.add(shipConfig1);
   
    ShipConfig shipConfig2 = new ShipConfig();
    shipConfig2.setId(2L);
    shipConfig2.setName("battleship");
    shipConfig2.setNumber(1);
    shipConfig2.setSize(4);
    shipConfigs.add(shipConfig2);

    ShipConfig shipConfig3 = new ShipConfig();
    shipConfig3.setId(3L);
    shipConfig3.setName("cruiser");
    shipConfig3.setNumber(1);
    shipConfig3.setSize(3);
    shipConfigs.add(shipConfig3);
   
    ShipConfig shipConfig4 = new ShipConfig();
    shipConfig4.setId(4L);
    shipConfig4.setName("destroyer");
    shipConfig4.setNumber(2);
    shipConfig4.setSize(2);
    shipConfigs.add(shipConfig4);
   
   
    ShipConfig shipConfig5 = new ShipConfig();
    shipConfig5.setId(5L);
    shipConfig5.setName("submarine");
    shipConfig5.setNumber(2);
    shipConfig5.setSize(1);
    shipConfigs.add(shipConfig5);
   
   
   
    gameConfig = new GameConfig();
View Full Code Here

    gameServer.setPlayerDao(playerDao);
    gameServer.setGameDao(gameDao);
    gameServer.setConfigService(new ConfigImpl());
   

    ShipConfig shipConfig1 = new ShipConfig();
    shipConfig1.setId(1L);
    shipConfig1.setName("aircraft carrier");
    shipConfig1.setNumber(1);
    shipConfig1.setSize(5);
    shipConfigs.add(shipConfig1);
   
    ShipConfig shipConfig2 = new ShipConfig();
    shipConfig2.setId(2L);
    shipConfig2.setName("battleship");
    shipConfig2.setNumber(1);
    shipConfig2.setSize(4);
    shipConfigs.add(shipConfig2);

    ShipConfig shipConfig3 = new ShipConfig();
    shipConfig3.setId(3L);
    shipConfig3.setName("cruiser");
    shipConfig3.setNumber(1);
    shipConfig3.setSize(3);
    shipConfigs.add(shipConfig3);
   
    ShipConfig shipConfig4 = new ShipConfig();
    shipConfig4.setId(4L);
    shipConfig4.setName("destroyer");
    shipConfig4.setNumber(2);
    shipConfig4.setSize(2);
    shipConfigs.add(shipConfig4);
   
   
    ShipConfig shipConfig5 = new ShipConfig();
    shipConfig5.setId(5L);
    shipConfig5.setName("submarine");
    shipConfig5.setNumber(2);
    shipConfig5.setSize(1);
    shipConfigs.add(shipConfig5);
   
   
    ships1.add(buildShip(shipConfig1,cellShip1));
    ships1.add(buildShip(shipConfig2,cellShip2));
View Full Code Here

TOP

Related Classes of es.mahulo.battleship.model.ShipConfig

Copyright © 2018 www.massapicom. 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.