CardSimEngine/cardsim/player.go
Kistaro Windrider f8b6b6b376
Start implementing Deck as a distinct type.
Deck does enough stuff it should be its own thing; its internal representation might change to make multiple insertions not quadratic, among other reasons. Currently it just does the obvious stuff, though. Allows inserting cards in random or specific slots and drawing cards. Shuffling a range of the deck comes later.
2023-04-01 11:50:39 -07:00

17 lines
359 B
Go

package cardsim
import "math/rand"
// Player stores all gameplay state for one player.
type Player[C StatsCollection] struct {
Stats C
Name string
Deck *Deck[C]
Hand []Card[C]
HandLimit int
Rules *RuleCollection[C]
Rand rand.Rand
Turn int
PendingMessages []Message
}