Documentation ¶
Index ¶
- Constants
- type Application
- func (app Application) Api(day int) string
- func (app Application) GetMethod(methodName string) (reflect.Value, reflect.Value, bool)
- func (app Application) GetName() string
- func (app Application) GetPuzzle(year int, day int) utils.Puzzle
- func (app Application) Help(cli *cli.CLI)
- func (app Application) List() string
- func (app Application) Render(cli *cli.CLI)
- func (app Application) Run(cli *cli.CLI)
- func (app Application) Summary(year int, day int) *utils.Summary
- func (app *Application) Y2018D09P1_inprogress()
- func (app *Application) Y2018D09P2_inprogress()
- func (app *Application) Y2018D09_Summary() *utils.Summary
- func (app *Application) Y2018D10P1()
- func (app *Application) Y2018D10P2()
- func (app *Application) Y2018D10_Summary() *utils.Summary
- func (app *Application) Y202018D09()
- func (app *Application) Y202018D10()
- type Grid
- func (g *Grid) AddPoint(p *Point)
- func (g *Grid) Bounds() (int, int, int, int, int, int)
- func (g *Grid) Compare(letter []string, x int, y int) (bool, []string)
- func (g *Grid) CountLetters() int
- func (g *Grid) Debug()
- func (g *Grid) Draw()
- func (g *Grid) FindMovingBoundaryPoints() (*Point, *Point, *Point, *Point)
- func (g *Grid) Get(x int, y int) *Point
- func (g *Grid) IsH(point *Point) bool
- func (g *Grid) Load(lines []string)
- func (g *Grid) Remap()
- func (g *Grid) Snapshot(x int, y int, width int, height int) []string
- func (g *Grid) Step(remap bool)
- type Location
- type Path
- type Point
- type Route
- type RouteLogic
Constants ¶
View Source
const DAY_2018_09_DATA = `` /* 717-byte string literal not displayed */
View Source
const DAY_2018_09_TEST_DATA = `London to Dublin = 464
London to Belfast = 518
Dublin to Belfast = 141`
View Source
const DAY_2018_10_DATA = `` /* 17379-byte string literal not displayed */
View Source
const DAY_2018_10_DATA_TEST = `` /* 1115-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
func NewApplication ¶
func NewApplication(cli *cli.CLI) Application
func (Application) Api ¶
func (app Application) Api(day int) string
func (Application) GetName ¶
func (app Application) GetName() string
func (Application) Help ¶
func (app Application) Help(cli *cli.CLI)
func (Application) List ¶
func (app Application) List() string
func (Application) Render ¶
func (app Application) Render(cli *cli.CLI)
func (Application) Run ¶
func (app Application) Run(cli *cli.CLI)
func (*Application) Y2018D09P1_inprogress ¶
func (app *Application) Y2018D09P1_inprogress()
rename this to the year and day in question
func (*Application) Y2018D09P2_inprogress ¶
func (app *Application) Y2018D09P2_inprogress()
rename this to the year and day in question
func (*Application) Y2018D09_Summary ¶
func (app *Application) Y2018D09_Summary() *utils.Summary
func (*Application) Y2018D10P1 ¶
func (app *Application) Y2018D10P1()
rename this to the year and day in question
func (*Application) Y2018D10P2 ¶
func (app *Application) Y2018D10P2()
rename this to the year and day in question
func (*Application) Y2018D10_Summary ¶
func (app *Application) Y2018D10_Summary() *utils.Summary
func (*Application) Y202018D09 ¶
func (app *Application) Y202018D09()
this is what we will reflect and call - so both parts with run. It's up to you to make it print nicely etc. The app reference has a CLI for logging.
func (*Application) Y202018D10 ¶
func (app *Application) Y202018D10()
this is what we will reflect and call - so both parts with run. It's up to you to make it print nicely etc. The app reference has a CLI for logging.
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
func (*Grid) CountLetters ¶
func (*Grid) FindMovingBoundaryPoints ¶
returns the outermost points moving in their "opposite" direction
type RouteLogic ¶
func NewRouteLogic ¶
func NewRouteLogic(data string) *RouteLogic
func (*RouteLogic) Analsyse ¶
func (logic *RouteLogic) Analsyse()
func (*RouteLogic) FindFirstAndLastLocations ¶
func (logic *RouteLogic) FindFirstAndLastLocations() (*Location, *Location)
func (*RouteLogic) GetLocation ¶
func (logic *RouteLogic) GetLocation(name string) *Location
Click to show internal directories.
Click to hide internal directories.