Skip to content

Commit

Permalink
Add basic cli capabillities
Browse files Browse the repository at this point in the history
  • Loading branch information
jubalh committed Mar 23, 2015
1 parent 435c792 commit 67eec26
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion pinkman.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ package main
import (
"fmt"
"io"
"os"

"github.com/bobappleyard/readline"
"github.com/codegangsta/cli"
"github.com/wfreeman/pgn"
"github.com/wfreeman/uci"
)

var b *pgn.Board
var stockfishPath = "/home/sb/stockfish-6-linux/stockfish-6-linux/Linux/stockfish_6_x64"

func main() {
func run(*cli.Context) {
var errmsg string
var infomsg string
var prompt string
Expand Down Expand Up @@ -105,3 +107,29 @@ func main() {
readline.AddHistory(inputline)
}
}

func cmdShow(*cli.Context) {
}
func main() {
app := cli.NewApp()

app.Name = "pinkman"
app.Usage = "the totally kafkaesque chess game"
app.Author = "Michael Vetter"
app.Version = "0.0.1"
app.Email = "g.bluehut@gmail.com"

app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "no-engine",
Usage: "don't play against an engine. Can be used in case two people want to play on the same computer"},
cli.StringFlag{
Name: "path",
Usage: "set path to UCI engine",
},
}

app.Action = run

app.Run(os.Args)
}

0 comments on commit 67eec26

Please sign in to comment.