package game

// "fmt"

// "math"

type PlayerDataModule interface {
	LoadDataFromDB(key interface{}) bool
	SaveDataFromDB(key interface{}) bool
	SetPlayer(p *Player)
	GetPlayer() *Player
	GetData() interface{}
	ClearData() bool
	Reconnect(bool)
	AutoSaveInterval()
}

type PlayerData struct {
	Name         string
	IsHaveDataDb bool
	M_Player     *Player
}

func (d *PlayerData) SetPlayer(p *Player) {
	d.M_Player = p
}

func (d *PlayerData) GetPlayer() *Player {
	return d.M_Player
}

func (d *PlayerData) Reconnect(b bool) {

}
func (d *PlayerData) AutoSaveInterval() {

}

func (d *PlayerData) LoadDataFromDB(UserName interface{}) bool {

	return true
}

func (d *PlayerData) SaveDataFromDB(Key interface{}) bool {

	return true
}
func (d *PlayerData) ClearData() bool {

	return true
}
func (d *PlayerData) GetData() interface{} {
	res := struct{}{}
	return res
}

func NewPlayerData(name string, player *Player) *PlayerData {
	return &PlayerData{
		Name:     name,
		M_Player: player,
	}
}
