A server for playing the two-player-tile-placement game inspired by Klaus-Jurgen Wrede's Carcassonne boardgame series - TigerZone.
##Authors Erik Christiansen
- Clone TigerZone Repository:
git clone https://github.com/chausen/TigerZoneServer.git - From the root directory: create a directory called
out - Run (from the root directory):
javac -d out -sourcepath src src/com/tigerzone/fall2016server/server/TournamentServerMain.java
- In Intellij Click on
File, thennew, thenProject from Version Controland chooseGitHub - For GitHub repository url:
https://github.com/chausen/TigerZoneServer.git - Mark
srcasSources Root&tstasTest Sources Root - Click on
File, thenProject Structure, then set Project SDK (we used java SDK 1.8045) and set Project Language Level to8 - lambda - In
root directorycreate directoryoutand make 2 subdirectoriesout/productionandout/test. InProject Structuresetcompile output pathtoout/productionand setcompile test output pathtoout/test - Add JUnit4 to classpath.
- Click
Build, thenBuild Project
TournamentServerMain.java can take 0 to 7 command-line arguments. These specify:
port number: intThe port number clients will connect toseed: intDetermines the order the tiles will be drawnmaxConnections: intThe server will wait until this many player's have connected, or 45 seconds has elapsed to begintournamentID: intIdentifies the tournament for use in logging# of Challengers: intThe number of challenges in the TournamentDeath Style: booleanIf true teams that forfeit in current challenge do not continue participate in following challengesServer Password: StringThe password for AIs to enter Tournament
Providing no arguments will start the server with the default values of:
Port: 4444Seed: 123456789maxConnections: 2tournamentID: 1# of Challenges: 1Death Style: FalseServer Password: TigerZone
Run (from the root directory): java -classpath out com.tigerzone.fall2016server.server.TournamentServerMain
Click Run: Run Main.java in fall2016gui directory
Included in the root directory is a bash script called StartServer.sh.
NOTE 1: Unix-based systems can run this in the command-line using ./StartServer.sh to continually start new tournaments
with a random seed and incrementing tournamentID.
NOTE 2: The location of your class files must be in out/production/TigerZone vs. just out, or the script will be modified.
- Make sure the
tstdirectory is marked as your Tests Root - Make sure JUnit4 is added to your classpath.
- Right-click
tstand clickRun 'All Tests'or enterCtrl-Shift-F10(using the default key-mapping)
