tic-tac-go

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2021 License: BSD-3-Clause

README

CircleCI Go Report Card GoDoc

About

Tic-Tac-Go is a simple, command line implementation of tic-tac-toe game written in Golang

Requirements

to run the game you only need to install golang

if you want to run a giu version of the game, you'll need some dependencies on linux, run:

sudo apt-get install -y libgtk-3-dev libasound2-dev libxxf86vm-dev

for more details, see a documentation of giu: https://github.com/AllenDang/giu#install

Installation

To install the game, first download it: go get github.com/gucio321/tic-tac-go and let's GO! Since now, an executale binary will be present in $GOPATH/bin/

How to run?

After installation, just execute go run github.com/gucio321/tic-tac-go or $GOPATH/bin/tic-tac-go

You can also download the source by git clone https://github.com/gucio321/tic-tac-go and then:

cd tic-tac-go
go get -d ./...
go run .

Screenshots

tic tac go in terminal

tic tac go with DearImgui using GIU

See also

there is a few wrappers of this game. see:

Motivation

When I'm learning a new programming language, I'm writtin a game like that to check myself. Because I liked the golang, I decided to share and improve my work.

Directories

Path Synopsis
cmd
internal
terminalgame/game
Package game contains terminal game implementation
Package game contains terminal game implementation
terminalgame/menu
Package menu contains a simple menu logic used in terminal game implementation
Package menu contains a simple menu logic used in terminal game implementation
terminalgame/utils
Package utils contains utilities used in terminal interface
Package utils contains utilities used in terminal interface
pkg
core/board
Package board provides board data
Package board provides board data
core/board/letter
Package letter contains letter's data
Package letter contains letter's data
core/pcplayer
Package pcplayer provides megods for simple-AI logic used in Tic-Tac-Go for calculating PC-player's move.
Package pcplayer provides megods for simple-AI logic used in Tic-Tac-Go for calculating PC-player's move.
core/players
Package players contains an implementation of tic-tac-toe players system
Package players contains an implementation of tic-tac-toe players system
core/players/player
Package player provides data used for tic-tac-go players
Package player provides data used for tic-tac-go players
game
Package game contains a common implementation of game.
Package game contains a common implementation of game.
giuwidget
Package giuwidget contains a giu implementation of game
Package giuwidget contains a giu implementation of game

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL