func (d *Director) PlayGame(path string) { hash, err := hashFile(path) if err != nil { log.Fatalln(err) } console, err := nes.NewConsole(path) if err != nil { log.Fatalln(err) } d.SetView(NewGameView(d, console, path, hash)) }
func testRom(path string) (err error) { defer func() { if r := recover(); r != nil { err = r.(error) } }() console, err := nes.NewConsole(path) if err != nil { return err } console.StepSeconds(3) return nil }