Kistaro Windrider
fb5735d5b9
Allow a pattern of multiple actions per turn. Card options can "refund" an action to the player if they should be free, or zero out the remaining actions if they should force the turn to go directly to the simulation step.
20 lines
440 B
Go
20 lines
440 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
|
|
ActionsPerTurn int
|
|
ActionsRemaining int
|
|
PermanentActions []Card[C]
|
|
Rules *RuleCollection[C]
|
|
Rand rand.Rand
|
|
Turn int
|
|
PendingMessages []Message
|
|
}
|