Пример #1
0
func saveQuit(a *area.Area, sav *save.Save) {
	err := sav.Save(*a)
	if err != nil {
		log.Println(err)
	}
	util.Quit()
}
Пример #2
0
// load loads old information from a save file.
func load(sav *save.Save, a *area.Area) (err error) {
	s, err := sav.Load()
	if err != nil {
		return errutil.Err(err)
	}
	*a = s.Area
	creature.Hero = s.Hero
	return nil
}