Functionality | State |
---|---|
Basic rules | |
Complete rules | |
Socket | |
RMI | |
GUI | |
CLI | |
Multiple games | |
Persistence | |
Domination or Towers modes | |
Terminator |
In a world of savage chaos, five combatants are locked inside a futuristic arena. Armed with sophisticated weaponry, their mission is to kill or be killed.
## Deliverables * [*Initial UML*](https://github.com/SalvadorCali/am03-ing-sw-2019-Bernasconi-Calici-Comelli/blob/master/deliverables/Initial-UML.pdf) * [*Final UML*](https://github.com/SalvadorCali/am03-ing-sw-2019-Bernasconi-Calici-Comelli/blob/master/deliverables/Final-UML.pdf) * [*server.jar*](https://github.com/SalvadorCali/am03-ing-sw-2019-Bernasconi-Calici-Comelli/blob/master/deliverables/server.jar) * [*client.jar*](https://github.com/SalvadorCali/am03-ing-sw-2019-Bernasconi-Calici-Comelli/blob/master/deliverables/client.jar) * [*Communication*](https://github.com/SalvadorCali/am03-ing-sw-2019-Bernasconi-Calici-Comelli/blob/master/deliverables/Communication.pdf) ## Getting Started ### Running * Open the terminal * Launch the jar files using: ``` java -jar jar_name.jar ``` There are 2 jars: -**server.jar**: runs the Server -**client.jar**: runs the Client ### Command-Line Arguments You can also run the Server with a list of command-line arguments that will set the main timers of the game. ``` java -jar server.jar START_TIME_MS BOARD_TIME_MS SPAWN_TIME_MS TURN_TIME_MS ``` * **START_TIME_MS**: time for the beginning of the game in milliseconds. * **BOARD_TIME_MS**: time for the choice of the board in milliseconds. * **SPAWN_TIME_MS**: time for the choice of the spawn in milliseconds. * **TURN_TIME_MS**: time for each turn in milliseconds. #### Rules for the timers: * All these times are contained in the Config class and handled by their classes contained in the controller.timer package. * If you don't put 4 command-line arguments, all the timers remain with the default value. * If you choose for one or more of them an incorrect value, the default value will be used. #### Default values: ``` START_TIME_MS = 10000; BOARD_TIME_MS = 10000; SPAWN_TIME_MS = 10000; TURN_TIME_MS = 50000; ``` ## Graphic Interface When you run the client.jar, you can choose between CLI or GUI: ``` [CLIENT]Choose 'cli' or 'gui': *insert 'cli' or 'gui'* ``` ### CLI
If you choose 'cli', two others strings will be printed, where you can choose the connection and the ip address.
``` [CLIENT]Choose 'rmi' or 'socket': *insert 'rmi' or 'socket'* [CLIENT]Please, set an ip address: *insert ip address* ``` ### GUI
If you choose 'gui' a screen will be open where you can put you data for the game.
## Functionalities ### Multiple Games
We implemented the multiple game advanced functionality. It is handled by the ServerControllerManager class, that creates a new ServerController for each game designated to handle its game.
#### Rules * If there are no games, a new game will be created. Each new game will be created when the previous reaches the minimum number of players. * The username is unique in the lobby, so you can't choose an username already used by another player, even if the other player is playing a different game. * If you are disconnected and try to reconnect yourself, the ServerControllerManager will look for you username in the list of disconnected users and reconnects you to the correct game. ## Built With * [GitHub](https://github.com/) - Web-based hosting service for version control using Git * [Intellij IDEA](https://www.jetbrains.com/idea/) - Java integrated development environment (IDE) * [Maven](https://maven.apache.org/) - Dependency Management * [SonarQube](https://www.sonarqube.org/) - Used to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities