Its an exciting dice game which is played between 2 or more players having numbered gridded squares. The number "portals" and "bounty Tile" are displayed on the checkered board. The objective of the game is for each player to navigate all their "pawns", according to the die roll from the start(bottom square) to the finish(top square) helped or hindered by the portals.
Trello link
- https://trello.com/b/o6AiO1BM/cse360-team-24
Dependency Installation:
libgdx library
- https://libgdx.badlogicgames.com/documentation.html
This project requires installation of Gradle. The steps to install Gradle in Eclipse is explained below,
Installing Gradle
- Open Eclipse, click Help -> Eclipse Marketplace
- Type in ‘gradle’ in the find text box and click Search
- Click Install from the search results for gradle
Importing the Project
- Go to File -> Import -> Gradle -> Gradle Project
- Click Browse and navigate to the root folder of your project, then click Build Model.
- Select all the projects and click Finish.
Java - MySQL Database Connectivity
-
Install Latest MySQL Database
To connect to MySQL from Java, you have to use the JDBC driver from MySQL. The MySQL JDBC driver is called MySQL Connector/J. You find the latest MySQL JDBC driver under the following URL: http://dev.mysql.com/downloads/connector/j. The download contains a JAR file which we require later.
-
Create a lib folder and copy the JDBC driver into this folder. Add the JDBC driver to your classpath. See below for Adding jars to the classpath.
-
Create a new database called game and start using it with the following command.
create database game
-
Create a user with the following command:
CREATE USER cse360 IDENTIFIED BY 'cse360';
or
Use local server applications like xampp or wamp to access mySQL via phpMyadmin local server to create user and database. Video link - https://www.youtube.com/watch?v=ueWpNe0PG34
grant usage on . to cse360@localhost identified by 'cse360';
grant all privileges on feedback.* to cse360@localhost;
Now create a table named 'scorecard' following SQL statement.
CREATE TABLE scorecard ( Player_Name VARCHAR(30) NOT NULL, Games_Won INT NOT NULL, Games_Played INT NOT NULL, Win_Rate FLOAT NOT NULL);
- The game will not run without the jdbc library. So include the library to Portals-and-Timemachines-code folder in the IDE and run the project as mentioned below. - The game will run without the mysql connection but the users cannot see or check with the scorecard.
Running the Project
- Right click the desktop project, Run As -> Java Application.
- Select DesktopLauncher.java
-or-
-
Right click DesktopLauncher.java from 'Portals-and-Timemachines-desktop' folder in package explorer, Run As -> Java Application.
-
NOTE: For running the game without setting up any database or in case if you encounter any challenges in setting up the database comment all the statements of the form "dbGame.dbConnect();" in "Game.java" file and run the game to check all the functionalities of the game that have been implemented, if you are running this way see to that you dont click on scorecard card button.
Code files:
- Game.java
- GameBoard.java
- GamePiece.java
- DBGameConnect.java
- Dice.java
- DesktopLauncher.java
- Ashwin Murthy
- Balaji Chandrasekaran
- Christopher Lavoy
- Naveen Kumar Subbiah
- Sriram Poondi Chinappa