The purpose of the project is to implement the board game Santorini following the architectural pattern Model View Controller for the realization of the model according to the object-oriented programming paradigm. The final result completely covers the rules defined by the game and allows you to interact with both a command line interface (CLI) and a graphical interface (GUI), the network has been managed with the traditional socket approach.
The following documentation includes the documents created for the design of the problem, the class diagrams in UML will be listed first then the code documentation (JavaDoc).
The following class diagrams represent the model according to which the game should have been implemented and the diagrams of the final product.
The following documentation includes a description for most of the classes and methods used, follows the Java documentation techniques and can be consulted at the following address: JavaDoc
Library/Plugin | Description |
---|---|
maven | management tool for software based on Java and build automation |
junit | Java framework for unit testing |
Swing | Java graphics library |
The following jars allow the launch of the game as described in the introduction feature. The features built according to the design specification are listed in the next section while the details for how to launch the system will be defined in the section called Execution of jar. To allow the game to run correctly, you must first run the server.jar and then the client.jar. The folder, where the client and server software are located, is at the following address: Jars.
- Regole Complete
- CLI
- GUI
- Socket
- Divinità Avanzate
The client is run by choosing the interface to play with, the possible choices are from the command line or graphical interface. The following sections describe how to run the client in one way or another.
To launch the client in CLI mode, type the following command:
java -jar client.jar -ip [server_ip] -cli
To launch the client in GUI mode, type the following command:
java -jar client.jar -ip [server_ip] -gui
-ip 127.0.0.1
: allows you to enter the IP address of the server to connect to, in the case shown 127.0.0.1;-cli/-gui
: allows you to choose whether to play in cli / gui. If not specified the default value is gui;
To launch the server, type the following command:
java -jar server.jar