Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Commit

Permalink
duplicate roles before passing to game
Browse files Browse the repository at this point in the history
game will freeze them so we need to dup

Possible to debate whose responsibility this should be, but let's just
pick one
  • Loading branch information
petertseng committed Feb 14, 2018
1 parent 9cceebe commit 226e973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cinch/plugins/rebellion_g54.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def do_start_game(m, channel_name, players, settings, start_args)
opts = {}
opts[:synchronous_challenges] = settings[:synchronous_challenges] if settings.has_key?(:synchronous_challenges)
roles = settings[:roles] || DEFAULT_ROLES
game = ::RebellionG54::Game.new(channel_name, players.map(&:user), roles, **opts)
game = ::RebellionG54::Game.new(channel_name, players.map(&:user), roles.dup, **opts)
rescue => e
m.reply("Failed to start game because #{e}", true)
return
Expand Down

0 comments on commit 226e973

Please sign in to comment.