README file for teams' Quoridor Project Contributors: Eric Cavanagh - Misspell Caster Montana Earle - Queen of Laughs-a-Lot Tylor Lehman - Board Master Dan Soucy - Golden Canadian Collin Walling - Does things Contents: 01: How to run the game 02: Gradle Help 03: Tips -------------------------------------------------------------------------- [01] How to run the game: 0. Build all class files with ./gradlew build 1. Navigate to ./build/libs 2. Start up at least two MoveServers (in different terminals), give them unique port numbers and a user type java -cp quoridorscmoridor-3.3.jar MoveServer 1234 user *note: you may have permission issues with this file. run chmod +x quoridorschmoridor-3.3.jar and voila! ======================================================== = VALID USER TYPES = ======================================================== = user --> human player = = lr --> simple AI that moves left and right = = rd --> simple AI that makes random moves = = fcrd --> flip coin roll dice = = maybe --> teams' awesome ai = ======================================================== 3. Run Game in another terminal. Give it the port-host of the participating MoveServers java -cp quoridorscmoridor-3.3.jar Game localhost:1234 \ localhost:5678 You can also start a 4-player game using a similar setup ... localhost 1234 Whiteface 5678 Gothics 9012 \ Redfield 3456 Note that the \ just means to continue the command onto the next line. You do not need to do this. 4. Play the game! You have to input moves via the terminal that is running the respective MoveServer An example move for player 0 is V-B (moves down) An example wall for any player is (IV-D,V-D), which places a horizontal wall starting at IV-D and ending at V-D Use the labels printed on the graphic display to guide your movements -------------------------------------------------------------------------- [02] Gradle Help: 1. If you have never run gradle, you might have to install it. run: ./gradlew 2. It should say downloading gradle.................. afterward you can run ./gradlew build ./gradlew clean The first builds the whole project (including running any tests), the second removes the build. 3. After you have built the code, run the following: java -cp build/libs/quoridorschmoridor.jar Main for an example of running a program. -------------------------------------------------------------------------- [03] Tips 1. Easy gradle build function add this to your .bashrc or .zshrc : function gb() { pushd . > /dev/null # you might have to adjust this line below cd "$HOME/405/teams/" > /dev/null ./gradlew build "$@" popd > /dev/null } you can now type gb from any directory to build the project! also you can pass arguments to gb like this: gb clean 2. Run class files from anywhere this will allow you to run any of your class files for our project regardless of what directory you are currently in export CLASSPATH="$HOME/teams/build/classes/main$CLASSPATH" 3. better git log configure git alias: git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" then git lg 4. gitk 5. other gradle build options gb javadoc outputs html files in build/docs/javadoc/ gb jar does exactly what it says on the tin (uh...) 6. git shortlog -ns (thanks matt) prints a list of each member's name along with their number of commits