Day 23 Progress

This commit is contained in:
2016-12-23 11:11:11 -06:00
parent 00518970c5
commit 7c21111b12
4 changed files with 267 additions and 2 deletions

View File

@@ -53,13 +53,22 @@ func main() {
} else {
fmt.Println(CenterText("Exit", tWidth))
}
fmt.Println()
fmt.Println(CenterText("To run the AdventOfCode Puzzle, pass the input as an argument to the program:", tWidth))
fmt.Println(CenterText("./day22 <filename>", tWidth))
fmt.Println(CenterText("For the part 1 solution:", tWidth))
fmt.Println(CenterText("./day22 <filename> -1", tWidth))
ev := termbox.PollEvent()
if ev.Type == termbox.EventKey {
switch {
case ev.Key == termbox.KeyArrowUp || ev.Ch == 'k':
menuPos--
if menuPos > 0 {
menuPos--
}
case ev.Key == termbox.KeyArrowDown || ev.Ch == 'j':
menuPos++
if menuPos < 3 {
menuPos++
}
case ev.Key == termbox.KeyEnter:
done = true
}