secret-hitler/game/state/player.go

31 lines
534 B
Go

package state
type PlayerState struct {
ID string
Name string
IsFacist bool
IsHitler bool
IsDead bool
IsChancellor bool
IsCandidateChancellor bool
IsPresident bool
IsCandidatePresident bool
IsVoting bool
IsShooting bool
IsInspecting bool
IsPeeking bool
}
func (state PlayerState) Redact(alignment Alignment) PlayerState {
state2 := state
state2.IsFacist = state2.IsFacist && alignment.CanSeeFacist()
state2.IsHitler = state2.IsHitler && alignment.CanSeeHitler()
return state2
}