Class: FloatRotateInstruction

Inherits:
Instruction show all
Includes:
RotateInstruction
Defined in:
lib/instructions/float/float_rotate.rb

Overview

pops the top 3 items of the :float stack; pushes them back in rotated order

If they were A, B and C (with C originally at the top of the stack) the result will be B, C, A (with A at the top)

needs: 3 :float

pushes: 3 :float

Instance Attribute Summary

Attributes included from RotateInstruction

#target_stack

Attributes inherited from Instruction

#context

Instance Method Summary collapse

Methods included from RotateInstruction

#cleanup, #derive, #preconditions?, #setup

Methods inherited from Instruction

all_instructions, #cleanup, #derive, #go, inherited, #needs, #preconditions?, #pushes, #setup, to_nudgecode

Constructor Details

#initialize(context) ⇒ FloatRotateInstruction

Returns a new instance of FloatRotateInstruction.



14
15
16
# File 'lib/instructions/float/float_rotate.rb', line 14

def initialize(context)
  super(context, :float)
end