xianghai2 / EclipseProject_1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cd game/target/
java -jar game-0.0.1-SNAPSHOT-jar-with-dependencies.jar
Please choose who will play first ( Alice stands for X, Bob stands for O ):
Alice
Player Alice ('X'), enter your move (row[1-3] column[1-3]):
1 2
   | X |
-----------
   |   |
-----------
   |   |
Player Bob ('O'), enter your move (row[1-3] column[1-3]):
2 1
   | X |
-----------
 O |   |
-----------
   |   |
Player Alice ('X'), enter your move (row[1-3] column[1-3]):
3 3
   | X |
-----------
 O |   |
-----------
   |   | X
Player Bob ('O'), enter your move (row[1-3] column[1-3]):
2 3
   | X |
-----------
 O |   | O
-----------
   |   | X
Player Alice ('X'), enter your move (row[1-3] column[1-3]):
2 3
This move at (2,3) is invalid. Try again...
Player Alice ('X'), enter your move (row[1-3] column[1-3]):
2 2
   | X |
-----------
 O | X | O
-----------
   |   | X
Player Bob ('O'), enter your move (row[1-3] column[1-3]):
3 1
   | X |
-----------
 O | X | O
-----------
 O |   | X
Player Alice ('X'), enter your move (row[1-3] column[1-3]):
3 2
   | X |
-----------
 O | X | O
-----------
 O | X | X
Alice won!

About


Languages

Language:Java 100.0%