Skip to content
Two goroutines playing tic-tac-toe
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
main
main.go

README.md

tic-tac-go

Two goroutines playing tic-tac-toe. They don't stop if one has won, and nothing is evaluated. Maybe I'll add that. This is my first time using go.

Example output:

   |   |   
-----------
   |   |   
-----------
   |   |   

***********

 x |   |   
-----------
   |   |   
-----------
   |   |   

***********

 x |   |   
-----------
   |   |   
-----------
   |   | o

***********

 x |   |   
-----------
   |   | x
-----------
   |   | o

***********

 x |   |   
-----------
 o |   | x
-----------
   |   | o

***********

 x | x |   
-----------
 o |   | x
-----------
   |   | o

***********

 x | x |   
-----------
 o |   | x
-----------
 o |   | o

***********

 x | x |   
-----------
 o | x | x
-----------
 o |   | o

***********

 x | x | o
-----------
 o | x | x
-----------
 o |   | o

***********

 x | x | o
-----------
 o | x | x
-----------
 o | x | o

***********
You can’t perform that action at this time.