This game pits a computer against a human player. The human player goes first and can enter a number 1-9 for the cell he wishes to place his marker, 'x'. If the position is taken or invalid, the appropriate message will be displayed. The user will then be asked to re-enter the input. After the user enters valid input, the board will be displayed. The computer will then position it's marker, 'o', for it's desired position. The first player to get 3 in a column, diagonal, or row will be declared the winner. In the instance that the board is full and there is no winner, a tie will be declared.
- Git clone this repo
- Open IntelliJ
- Select
Import Project
and select the directory for this repo - Select
Create project from existing sources
and pushNext
- Enter a
Project name
and pushNext
- Once in the project, from the "Run" menu, choose "Edit Configurations"
- Push the "+" button. Name the project and choose "com.company.TicTacToe" for the main class. Push "OK"
- From the "Run" menu, chose "Run {project name}" or "Run"
- Git clone this repo
- Open Eclipse and choose your workspace.
- File >> Open Projects File System
- In the line with "Import source", select "Directory" and selec the directory for this repo and push "Finish"
- Run >> Run Configurations >> Java Application, click the new button in the upper left hand corner.
- Give the configuration a name.
- Click "Browse" in the "Project" section and select the folder for this repo.
- Click "Search" in the "Main class" section and "TicTacToe - com.company"
- Push "Apply". Push "Run".
- Determine your jdk. If you're on a Mac, you can determine what your current jdk is by doing the following:
- cd
/Library/Java/JavaVirtualMachines/
- ls
- From your
HOME
directory, runexport JAVA_HOME=/Library/Java/JavaVirtualMachines/{jdk_version}