aboutsummaryrefslogtreecommitdiff
path: root/go/game/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/stack.go')
-rw-r--r--go/game/stack.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/go/game/stack.go b/go/game/stack.go
index 9132ae13..cf0622ce 100644
--- a/go/game/stack.go
+++ b/go/game/stack.go
@@ -17,11 +17,11 @@ func (s *Stack) IsEmpty() bool {
return len(s.Actions) == 0
}
-func (s *Stack) Push(a Action) {
+func (s *Stack) push(a Action) {
s.Actions = append(s.Actions, a)
}
-func (s *Stack) Pop() {
+func (s *Stack) pop() {
l := len(s.Actions)
if l == 0 {
log.Fatalf("Can not pop from empty stack")
@@ -41,6 +41,7 @@ func (s *Stack) Pop() {
func (s *Stack) Resolve() {
for !s.IsEmpty() {
s.gameState.AllPassing(false)
- s.Pop()
+ s.pop()
+ s.gameState.stateBasedActions()
}
}