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 Control
and chooseGitHub
- For GitHub repository url:
https://github.com/chausen/TigerZoneServer.git
- Mark
src
asSources Root
&tst
asTest 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 directory
create directoryout
and make 2 subdirectoriesout/production
andout/test
. InProject Structure
setcompile output path
toout/production
and setcompile test output path
toout/test
- Add JUnit4 to classpath.
- Click
Build
, thenBuild Project
TournamentServerMain.java
can take 0 to 7 command-line arguments. These specify:
port number: int
The port number clients will connect toseed: int
Determines the order the tiles will be drawnmaxConnections: int
The server will wait until this many player's have connected, or 45 seconds has elapsed to begintournamentID: int
Identifies the tournament for use in logging# of Challengers: int
The number of challenges in the TournamentDeath Style: boolean
If true teams that forfeit in current challenge do not continue participate in following challengesServer Password: String
The password for AIs to enter Tournament
Providing no arguments will start the server with the default values of:
Port: 4444
Seed: 123456789
maxConnections: 2
tournamentID: 1
# of Challenges: 1
Death Style: False
Server 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
tst
directory is marked as your Tests Root - Make sure JUnit4 is added to your classpath.
- Right-click
tst
and clickRun 'All Tests'
or enterCtrl-Shift-F10
(using the default key-mapping)