Difference between revisions of "CISC181 S2017 Lab4"

From class_wiki
Jump to: navigation, search
(Instructions)
Line 7: Line 7:
 
===Instructions===
 
===Instructions===
  
Add TicTacToe.java and TicTacToeBoard.java to your project folder.  Make your main() function in Lab4.java look like this:
+
Add <tt>TicTacToe.java</tt> and <tt>TicTacToeBoard.java</tt> to your project folder.  Make your main() function in <tt>Lab4.java</tt> look like this:
  
 
  TicTacToe TTT = new TicTacToe();
 
  TicTacToe TTT = new TicTacToe();
Line 19: Line 19:
 
===Finishing up===
 
===Finishing up===
  
Remember to use proper [https://google-styleguide.googlecode.com/svn/trunk/javaguide.html naming and formatting style] throughout your code, and submit your <tt>TicTacToeBoard.java</tt> on Sakai by '''Friday, March 10'''
+
Remember to use proper [https://google-styleguide.googlecode.com/svn/trunk/javaguide.html naming and formatting style] throughout your code, and submit ONLY <tt>TicTacToeBoard.java</tt> on Sakai by '''Friday, March 10'''

Revision as of 12:02, 6 March 2017

Preliminaries

  • Make a new project with n = 4 (following these instructions)
  • Name your main class "Lab4" (when creating a new module in the instructions above, in the Java class name field)

Instructions

Add TicTacToe.java and TicTacToeBoard.java to your project folder. Make your main() function in Lab4.java look like this:

TicTacToe TTT = new TicTacToe();
TTT.run_tournament();
 

Modify TicTacToeBoard.java by adding your name in a comment before the class body. Inside the class you will implement the chooseMonteCarloMove() method as explained below.

Simple tic-tac-toe AI

Finishing up

Remember to use proper naming and formatting style throughout your code, and submit ONLY TicTacToeBoard.java on Sakai by Friday, March 10