Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Grigencha
5174b84a1b fixed client-hosted server don't thorw an exception
- added serialization to the client-hosted server
2024-10-14 11:15:27 +02:00
Daniel Grigencha
42b995a4e7 added animation of a shell to the game
- in BattleShipServer class added serialization of the AnimationMessage classs
- added to VoidVisitor and Visitor the Shell class
- edited the ServerGameLogic class to implement a new Animation state (see new Server-State-Chart)
- added a new client state AnimationState (see new Client-State-Chart)
2024-10-13 03:19:44 +02:00
Daniel Grigencha
2c4e2fd92d improved code to pass the code analysis 2024-10-09 23:30:28 +02:00
Daniel Grigencha
08c5eeb63d added realistic visual effects to the game
- imported the jme3-effects library
- edited SeaSynchronizer to handle different effects
- added to the ShipControl class in the controlUpdate(float tpf) method the handler that moves a destroyed ship downward
2024-10-09 23:28:02 +02:00
Daniel Grigencha
9d5f3ac396 added the feature that a client can host a server
- added a class BattleshipServer (a client host a local server) and ReceivedMessage
- edited the NetworkDialog, that a client has a checkbox to select to host a server
-
2024-10-09 18:30:49 +02:00
Daniel Grigencha
28ba183b84 fixed BackgroundMusic
before play a new music, the volume prefences should be set
2024-10-09 17:04:08 +02:00
Daniel Grigencha
a44cbf2a72 added background music to the game
- added a class BackgroundMusic: is an AbstractAppState and GameEventListener that handles the backgroundmusic
- attached the BackgroundMusic to the stateManager  in the BattleshipApp
- added to the Menu a CheckBox and Slider to manipulate the volume of the backgroundmusic
- added four different music files (for different states of the game)
- edited the WaitState and BattleState to play different music files when chaing to that state
- added to ClientGameLogic a new method playMusic(Music) to play the right music (depends on the current state)
- added a new method receivedEvent(MusicEvent) to handle the music events
- added a new enum Music, that represents different types of music
- added a new record MusicEvent(Music), that decides which music shall play
2024-10-09 17:03:12 +02:00
Daniel Grigencha
ec80dd40ce added JavaDocs to the FloatMath class 2024-10-09 02:14:15 +02:00
Daniel Grigencha
046707642f fixed bugs in the JSON validation
- the method isWithinBounds(Battleship ship) couldn't check if the ship is the bounds of the map
2024-10-05 13:20:20 +02:00
Daniel Grigencha
a3b5452fb9 added 3d models for the ships
- added different models (see README.txt of the files)
- added methods to the SeaSynchronizer class to represent different ships sizes with different models
2024-10-05 05:41:12 +02:00
Daniel Grigencha
eda4f06a75 added server-side and client-side validation for JSON files
- added the client-side validation in the EditorState class
- added the server-side validation in the WaitState and ServerGameLogic class
- added Getter in the ShipMapDTO
- added the 'map.invalid' in the properties
2024-10-05 05:32:26 +02:00
Daniel Grigencha
0d2781dbe4 fixed failing tests
- ShipMapTest: notify ItemRemovedEvent when calling the remove method.
- ClientGame1Player1 and ClientGame2Player2Test: Ensure opponent's is retrieved in game over state.
2024-10-05 04:41:24 +02:00
Daniel Grigencha
ef16a3f92b Revert main branch 2024-10-02 13:30:55 +02:00
Felix Koppe
3a2f20e45c Fix ShipMap.remove 2024-10-02 08:21:32 +02:00
Mark Minas
71a4ac8d12 added contents 2024-09-18 17:04:31 +02:00