go-fifteen-puzzle

command module
v0.0.0-...-5f38bd8 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2014 License: MIT Imports: 4 Imported by: 0

README

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]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
io

Jump to

Keyboard shortcuts

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