Class: SQA::Strategy::Random

Inherits:
Object
  • Object
show all
Extended by:
Common
Defined in:
lib/sqa/strategy/random.rb

Class Method Summary collapse

Methods included from Common

desc, trade_against

Class Method Details

.trade(vector) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/sqa/strategy/random.rb', line 8

def self.trade(vector)
	case rand(9)
	when (0..2)
		:buy
	when (3..5)
		:sell
	else
		:hold
	end
end