Package es.mahulo.battleship.model

Examples of es.mahulo.battleship.model.ShipExecption


    if (ship.getCells() == null ||
        ship.getCells().size() == 0 ) {
     
      logger.error("No cells " + ship );
     
      throw new ShipExecption("No cells " + ship);
    }
   
    logger.info("checkCells ok");
  }
View Full Code Here


    logger.info("checkSize " +  ship );
   
    if (ship.getCells().size() != ship.getShipConfig().getSize()) {
      logger.error("Size of the ship is incorrect " + ship );
     
      throw new ShipExecption("Size of the ship is incorrect " + ship);
    }
   
    logger.info("checkSize ok");
  }
View Full Code Here

   
    if ( ( numberOfShipThisType + 1 ) > ship.getShipConfig().getNumber() )  {
     
      logger.error("Number of ship incorrect " + ship.getShipConfig().getName());
     
      throw new ShipExecption("Number of ship incorrect " + ship.getShipConfig().getName());
    }
   
    logger.info("checkNumberOfShip ok");
     
  }
View Full Code Here

       ( cell.getY() < 1 ) ||
       ( cell.getY() > gameConfig.getDimensionY() ) ) {
     
      logger.error(" Position of ship incorrect: outside dimensions " + cell);
     
      throw new ShipExecption(" Position of ship incorrect: outside dimensions " + cell);
    }
 
    logger.info("checkInsideBoard ok");
     
  }
View Full Code Here

            if( ( ( cell.getX() -i )==aCell.getX() ) &&
                ( ( cell.getY() -j )==aCell.getY() ) ) {
             
              logger.error(" Position of ship incorrect: not empty " + cell);
             
              throw new ShipExecption(" Position of ship incorrect: not empty " + cell);
            }
          }
        }
      }
    }
View Full Code Here

TOP

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

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.