https://github.com/gucio321/tic-tac-go
A simple, GO implementation of tic-tac-toe game.
https://github.com/gucio321/tic-tac-go
game go golang tic-tac-toe tic-tac-toe-game tic-tac-toe-go
Last synced: 6 months ago
JSON representation
A simple, GO implementation of tic-tac-toe game.
- Host: GitHub
- URL: https://github.com/gucio321/tic-tac-go
- Owner: gucio321
- License: bsd-3-clause
- Created: 2021-03-01T09:24:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T07:46:27.000Z (6 months ago)
- Last Synced: 2025-04-07T08:32:11.729Z (6 months ago)
- Topics: game, go, golang, tic-tac-toe, tic-tac-toe-game, tic-tac-toe-go
- Language: Go
- Homepage:
- Size: 1.79 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://goreportcard.com/report/github.com/gucio321/tic-tac-go)
[](https://pkg.go.dev/mod/github.com/gucio321/tic-tac-go)
[](https://codecov.io/gh/gucio321/tic-tac-go)Tic-Tac-Go
is an implementation
of the tic-tac-toe game written in Golang
In addition it implements a relatively simple
AI logic for PC players. For more details see
here
# Installation
## standard installation
### Requirements
to run the game you just need to have
[GO programming language](https://golang.org) installed.You may also want to use graphical version of the game,
so I suggest following
[GIU installation instruction](https://github.com/AllenDang/giu#install)### Installing binaries
To install the game with golang api,
first download it: `go get github.com/gucio321/tic-tac-go`
and let's GO!
Since now, an executable will be present in `$GOPATH/bin/` directory.#### So how to run now?
After installation, just run
`go run github.com/gucio321/tic-tac-go/cmd/terminal-game` for
simple console game implementation or
`go run github.com/gucio321/tic-tac-go/cmd/giu-game` for
advanced graphical one.### Well, but I'd like to know more about source code!
You can also download the source by running
`git clone https://github.com/gucio321/tic-tac-go`
and then, to set up the project:```sh
cd tic-tac-go
go get -d ./...
```## Docker installation
Since v3, I support Docker
to build and run the game.### plain docker
images are available on [quay.io](https://quay.io/repository/gucio321/tic-tac-go)
Note, that you need to add the following options to
correctly run the container:```shell
docker run \
-d
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix/:/tmp/.X11-unix/ \
--security-opt label=type:container_runtime_t \
quay.io/gucio321/tic-tac-go:latest
```### docker compose
you can use docker-compose to skip the above commands:
```shell
docker-compose up -d
```# Screenshots


## Motivation
When I'm learning a new programming language, I write a game
like this one to check myself. Because I liked [golang](https://golang.org)
and decided to share and improve my work.