To Build this Project
git clone https://github.com/sirajahmadzai/Machiavelli-Synchronous.git
cd Machiavelli-Synchronous
mvn compile
mvn package
mvn package -DstipTests
This will generate a jar file that is executable by double clicking it if your OS supports running jar files or by using the following command:
java -jar <path_to_jar>
For Maven help, visit:
https://maven.apache.org/guides/getting-started/
Importing and Running with Intellij
-
From the main menu, choose VCS | Checkout from Version Control | Git, or, if no project is currently opened, choose Checkout from Version Control | Git on the Welcome screen.
-
In the Clone Repository dialog, specify the URL of the remote repository you want to clone (you can click Test to make sure that connection to the remote can be established).
-
In the Directory field, specify the path where the folder for your local Git repository will be created into which the remote repository will be cloned.
-
Click Clone. If you want to create a IntelliJ IDEA project based on the sources you have cloned, click Yes in the confirmation dialog. Git root mapping will be automatically set to the project root directory.
-
Once the project is cloned, Intellij will detect the pom.xml file and ask if you would like to add the project as a maven project, click yes
Set the SDK if it's not already set
-
Then,From the main menu, select File | Project Structure (Ctrl+Shift+Alt+S).
-
Under the Project Settings section, select Project.
-
From the Project SDK list, select 1.8 (java version "1.8.0_191").
-
If the necessary SDK is not defined in IntelliJ IDEA yet, click New and specify its home directory.
-
Also specify the out folder if it is not specified
Set src as source
-
Go to File | Project Structure, or press Ctrl+Shift+Alt+S.
-
Select Modules under the Project Settings section.
-
Select the necessary module, and then open the Sources tab in the right-hand part of the dialog.
-
Select src folder and mark it as Sources
Run the Project
-
Navigate to src->main->java->client->App.java
-
Right click App.java and select "Run 'App.main()'"
Importing and Running with Eclipse
-
Download Machiavelli-Synchronous as a zip file from the GitHub repo or github clone
-
`File --> Import --> Maven --> Import existing maven projects --> Machiavelli-Synchronous --> pom.xml selected.
-
From there, you can do whatever. Select the main class (App) from src/main/java/client and run (as application).
How to Play the Game
-
Run App from src/main/java/client
-
Either start the game (if you are the first player and a game isn't already running) or join the game (if a server is already running and you are not the first player)
-
Once all players have joined, wait for your turn
How to Win
- Get rid of all the cards in your hand by playing valid sets to the table