Module: SDC::AI

Defined in:
lib/core/AI.rb

Defined Under Namespace

Classes: Script

Class Method Summary collapse

Class Method Details

.doneObject



31
32
33
# File 'lib/core/AI.rb', line 31

def self.done
	Fiber.yield
end

.foreverObject



51
52
53
54
55
56
# File 'lib/core/AI.rb', line 51

def self.forever
	loop do
		yield
		done
	end
end

.onceObject



39
40
41
42
# File 'lib/core/AI.rb', line 39

def self.once
	yield
	done
end

.times(n) ⇒ Object



44
45
46
47
48
49
# File 'lib/core/AI.rb', line 44

def self.times(n)
	n.times do
		yield
		done
	end
end

.wait(n) ⇒ Object



35
36
37
# File 'lib/core/AI.rb', line 35

def self.wait(n)
	n.times {done}
end