Created
August 30, 2014 15:56
-
-
Save matburt/1afa014001a6229f43c2 to your computer and use it in GitHub Desktop.
A Simple Go bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "github.com/matburt/vindinium-go-engine" | |
| "fmt" | |
| ) | |
| var ( | |
| client vindinium.Client | |
| ) | |
| type MatBot struct {} | |
| func (m MatBot) Move(state *vindinium.State) vindinium.Direction { | |
| return "South" | |
| } | |
| func main() { | |
| b := MatBot{} | |
| c := vindinium.NewTrainingClient("yourkey", "5", true, false, true, b) | |
| c.Start() | |
| c.Play() | |
| fmt.Println("Game Finished") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment