JavaGameBox is a simple game platform that allows users to play classic games. It includes features like user authentication, score tracking, and a leaderboard system.
The project is organized as follows:
src/main/java/ru/ivannovr: Contains the main application code.games: Logic for individual games.gui: Graphical user interface components.utils: Utility classes, including database management.
src/main/resources: Contains resources like icons and configuration files.pom.xml: Maven configuration file for dependency management and project building.
To build the project, you need to have Maven installed. You can download Maven from the official website.
Once Maven is installed, navigate to the project root directory and run:
mvn clean packageThis command compiles the code, runs tests, and packages the application into a JAR file located in the target directory.
To run the project, you need Java installed. You can download Java from the official website.
Additionally, the project requires PostgreSQL to be installed and running. You can download PostgreSQL from the official website.
Before launching the application, set up the database:
- Create a new database in PostgreSQL.
- Update the database URL, username, and password in the command-line arguments when running the JAR file.
Run the application with the following command:
java -jar target/JavaGameBox-1.1.1.jar --db-url=<database_url> --db-user=<database_user> --db-password=<database_password>Replace <database_url>, <database_user>, and <database_password> with your actual PostgreSQL connection details.
- The project uses Maven for dependency management (see
pom.xmlfor details). - Logging is handled by Log4j, with configuration defined in
src/main/resources/log4j2.xml. - The GUI is built using Swing.
- Each game is implemented using object-oriented principles, extending an
AbstractGameclass.
For more details, refer to the source code and comments.