edited SeaSynchronizer , EditorState, ServerGameLogic
added JavaDocs for the new and adapted functions added a new invalid map for testing purposes fixed implemented the logic to check for invalid maps in the method received in ServerGameLogic
This commit is contained in:
@@ -138,7 +138,7 @@ public Spatial visit(Battleship ship) {
|
||||
|
||||
/**
|
||||
* Creates the appropriate graphical representation of the specified battleship.
|
||||
* The representation is either a detailed model or a simple box based on the length of the ship.
|
||||
* The representation is a detailed model based on the length of the ship.
|
||||
*
|
||||
* @param ship the battleship to be represented
|
||||
* @return the spatial representing the battleship
|
||||
@@ -208,6 +208,12 @@ private Spatial createBattleship(Battleship ship) {
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a detailed 3D model to represent a "Big Ship"
|
||||
* @param ship
|
||||
* @return the spatial representing the "Big Ship" battleship
|
||||
*/
|
||||
private Spatial createBigShip(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(DESTROYER);
|
||||
|
||||
@@ -219,6 +225,11 @@ private Spatial createBigShip(Battleship ship) {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a detailed 3D model to represent a "Medium Ship"
|
||||
* @param ship
|
||||
* @return the spatial representing the "Medium Ship" battleship
|
||||
*/
|
||||
private Spatial createMediumShip(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(FERRY);
|
||||
|
||||
@@ -230,6 +241,11 @@ private Spatial createMediumShip(Battleship ship) {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a detailed 3D model to represent a "Small Ship"
|
||||
* @param ship
|
||||
* @return the spatial representing the "Small Ship" battleship
|
||||
*/
|
||||
private Spatial createSmallShip(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(SMALL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user