add turn to BoardState and remove it from RoyaleRuleset (#52)
This commit is contained in:
parent
17556e15c1
commit
e9f408cdbb
4 changed files with 31 additions and 27 deletions
|
|
@ -10,8 +10,6 @@ type RoyaleRuleset struct {
|
|||
|
||||
Seed int64
|
||||
|
||||
// TODO: move Turn into BoardState?
|
||||
Turn int32
|
||||
ShrinkEveryNTurns int32
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +26,7 @@ func (r *RoyaleRuleset) CreateNextBoardState(prevState *BoardState, moves []Snak
|
|||
}
|
||||
|
||||
// Royale's only job is now to populate the hazards for next turn - StandardRuleset takes care of applying hazard damage.
|
||||
err = r.populateHazards(nextBoardState, r.Turn)
|
||||
err = r.populateHazards(nextBoardState, prevState.Turn+1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue