********* *To clear the database: ********* 1: ssh to mahjongg.lab.ece.cmu.local 2: Run "create_table.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/mysqlScripts/create_table.sql 3: Run "setup_templates.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/mysqlScripts/setup_templates.sql 4: Run "tr_i_game.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/mysqlScripts/tr_i_game.sql ********* *To run the BaseLine demo: ********* 1: ssh into a cluster machine (e.g., magenta, periwinkle, or othello). 2: copy the server jar file (SuDuelKu.jar) to the deploy directory of JBoss. cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/server/SuDuelKu.jar /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/jboss/default/deploy/ 3: Set your JAVA_HOME environment variable to the appropriate install of java. On color machines => /usr/local/j2sdk1.4.0/ On games machines => /usr/local/j2sdk1.4.2_02/ 4: Start JBoss /afs/ece/class/ece749/ejb/jboss-3.2.3/bin/run.sh -c team1 & 5: Wait for JBoss to finish loading (~5min). 6: In a new terminal window, ssh into a different cluster machine. 7: Startup the client (ssd.mse.client.ui.Driver) passing it the arguments: EJB 11099. EJB is a flag to tell the application to use the remote game room rather then a local stub. 11099 is the port we have JBoss configured to use for JNDI. Make sure that SuDuelKuClient.jar, SuDuelKuServer-Client.jar, and jbossall-client.jar are on the classpath. java -cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/client/SuDuelKuClient.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/client/lib/SuDuelKuServer-Client.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/baselineDemo/client/lib/jbossall-client.jar ssd.mse.client.ui.Driver EJB crnelson periwinkle.ece.cmu.edu 11099 ********* *To play! ********* 1: You can list games with the "l" command. If you have just reset the database you will get a message saying there are no games. 2: Create a new game with the "c " command. 3: If you list games again with the "l" command you will see the game you just created listed with the name you supplied. 4: Use the "r" command to indicate you are ready to play. At this point you cannot select the game you would like to play, you simply get to play the last game you created. 5: Now you get to fill in the numbers on the board. In SuDuKu, the object of the game is to enter the numbers 1 - 9 into the squares such that there is only one occurrence of each number (1 - 9) in each row, column, and box (3x3 square). You can fill in a square using the "e " command. The rows and columns use a zero based index (e.g., the top left square is 0, 0). If you enter an invalid answer, the board is redrawn as it was before (error message to be implemented later). If you enter a valid number, the board will be redrawn updated with your answer. Squares that need to be filled in are represented with a '#' character. An example answer for the only game board currently in our application is 9 for square 0, 0 (top left) or 7 for square 6, 3 (top left square of the bottom center box). The game will notify you when you have successfully filled in all the squares. There is a unique answer, so there is no need to delete any entered number. ********* *Gotchas ********* 1: The user cannot select the game they wish to play, but must play the most recently created game. 2: There is no way to quit the game once it has started (other than control-C). 3: No error or any other type of message is reported when a user tries to enter an invalid answer, they simply get prompted to enter another answer. 4: For most exceptions, when they are caught we only print a stack trace. We are slowly migrating to more graceful ways of reporting exceptions that cannot be recovered from to the user. 5: The port for JNDI is currently hard-coded to 11099, though it is in one place and can easily be changed in code. We plan to migrate to a config file.