Skip to content

Commit

Permalink
[bugfix] Save current and proposed game events correctly in history
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Jan 2, 2019
1 parent b6541a0 commit 4780889
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/app/controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ func NewState() (s *State) {

func (s State) DeepCopy() (c State) {
c = s
c.GameEvents = []*GameEvent{}
c.GameEvents = make([]*GameEvent, len(s.GameEvents))
copy(c.GameEvents, s.GameEvents)
c.GameEventProposals = []*GameEventProposal{}
c.GameEventProposals = make([]*GameEventProposal, len(s.GameEventProposals))
copy(c.GameEventProposals, s.GameEventProposals)
if s.PlacementPos != nil {
c.PlacementPos = new(Location)
Expand Down

0 comments on commit 4780889

Please sign in to comment.