mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 00:02:33 +00:00
Added team colors hash
This commit is contained in:
@@ -2,7 +2,7 @@ class IMICRTS
|
||||
class Player
|
||||
attr_reader :id, :name, :color, :team, :entities, :orders, :camera, :spawnpoint
|
||||
attr_reader :selected_entities
|
||||
def initialize(id:, spawnpoint:, name: nil, color: Gosu::Color.rgb(rand(150..200), rand(100..200), rand(150..200)), team: nil)
|
||||
def initialize(id:, spawnpoint:, name: nil, color: IMICRTS::TeamColors.values.sample, team: nil)
|
||||
@id = id
|
||||
@spawnpoint = spawnpoint
|
||||
@name = name ? name : "Novice-#{id}"
|
||||
|
||||
Reference in New Issue
Block a user