Module: Api::ColorExtension::ClassMethods

Defined in:
lib/sc2ai/protocol/extensions/color.rb

Overview

Adds additional functionality to message class Api::Color

Instance Method Summary collapse

Instance Method Details

#randomApi::Color

Creates a new Api::Color object with random rgb values

Returns:



13
14
15
# File 'lib/sc2ai/protocol/extensions/color.rb', line 13

def random
  Api::Color.new(r: rand(0..255), g: rand(0..255), b: rand(0..255))
end