Class: Gobstones::Lang::Oeste
Constant Summary
Constants inherited
from Literal
Literal::OPERATORS_MAPPING
Instance Method Summary
collapse
Methods inherited from Direction
#<, all, order, #return_type
Methods inherited from Literal
#<, #<=>, #==, #evaluate, #if_false, #if_true, #not, #return_type, #same_type_as, #true?
Methods inherited from Expression
#evaluate, #is_function_call?
#==, #equality_attributes
Instance Method Details
#can_move?(head) ⇒ Boolean
102
103
104
|
# File 'lib/gobstones/lang/literals/direction.rb', line 102
def can_move?(head)
head.can_move_west?
end
|
#move(head) ⇒ Object
106
107
108
|
# File 'lib/gobstones/lang/literals/direction.rb', line 106
def move(head)
head.move_west
end
|
#next ⇒ Object
118
119
120
|
# File 'lib/gobstones/lang/literals/direction.rb', line 118
def next
Norte.new
end
|
#opposite ⇒ Object
110
111
112
|
# File 'lib/gobstones/lang/literals/direction.rb', line 110
def opposite
Este.new
end
|
#previous ⇒ Object
114
115
116
|
# File 'lib/gobstones/lang/literals/direction.rb', line 114
def previous
Sur.new
end
|
#to_s ⇒ Object
122
123
124
|
# File 'lib/gobstones/lang/literals/direction.rb', line 122
def to_s
'Oeste'
end
|