Exemple #1
0
func (sr Server) LoadState(key int64, sta *game.State) (err error) {
	da := new(game.StateData)
	if err = sr.LoadSD(key, da); err == nil {
		sta.FromData(da)
	}
	return
}
Exemple #2
0
func (sr Server) SaveState(sta *game.State) (key int64, err error) {
	return sr.SaveSD(sta.Data())
}