snengame/internal/game/player.go

20 lines
326 B
Go
Raw Normal View History

2021-07-22 15:37:25 -04:00
package game
2021-07-15 19:26:57 -04:00
type Player struct {
2021-07-29 14:48:36 -04:00
Name string `json:"name"`
Id int `json:"id"`
Hand []*Card `json:"hand"`
Life int `json:"life"`
Ready bool `json:"ready"`
2021-07-15 19:26:57 -04:00
}
func NewPlayer(name string, id int) *Player {
return &Player{
2021-07-29 14:48:36 -04:00
Name: name,
Id: id,
Hand: []*Card{},
Life: 3,
Ready: false,
2021-07-15 19:26:57 -04:00
}
}