Skip to content

HugoMFernandes/go-fifteen-puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go Fifteen Puzzle

A simple (term-based) Go implementation of 15-puzzle. It relies on termbox for rendering, so it should work on any platform.

Note: I wrote this while learning Go's syntax and package structure, so the code could probably use some improvements (this was literally the first program I wrote after completing the tour).

Installing

Make sure you have both Git and Go installed and that your $GOPATH is defined.

Dependencies

You need to get termbox

Install command

Get the package

$ go get github.com/HugoMFernandes/go-fifteen-puzzle

Move to the package directory and install it to $GOPATH/bin

$ go install

Running

Run a simple 15-puzzle (4x4, with one empty space)

$ go-fifteen-puzzle

Or specify custom width/heights for the puzzle (as long as they fit on the terminal!)

$ go-fifteen-puzzle [-w width] [-h height]

About

Simple implementation of fifteen-puzzle (term-based)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages