18 lines
272 B
Go
18 lines
272 B
Go
package game
|
|
|
|
type Player struct {
|
|
Name string `json:"name"`
|
|
Id int `json:"id"`
|
|
Hand []*Card `json:"hand"`
|
|
Life int `json:"life"`
|
|
}
|
|
|
|
func NewPlayer(name string, id int) *Player {
|
|
return &Player{
|
|
Name: name,
|
|
Id: id,
|
|
Hand: []*Card{},
|
|
Life: 3,
|
|
}
|
|
}
|