stub state
This commit is contained in:
30
game/state/player.go
Normal file
30
game/state/player.go
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user