Class: DragMove
- Inherits:
-
Object
- Object
- DragMove
- Includes:
- HasHints
- Defined in:
- lib/software_challenge_client/drag_move.rb
Overview
Ein Zug, der einen auf dem Spielbrett befindlichen Spielstein bewegt.
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Attributes included from HasHints
Instance Method Summary collapse
-
#initialize(start, destination) ⇒ DragMove
constructor
A new instance of DragMove.
- #to_s ⇒ Object
Methods included from HasHints
Constructor Details
#initialize(start, destination) ⇒ DragMove
Returns a new instance of DragMove.
13 14 15 16 17 |
# File 'lib/software_challenge_client/drag_move.rb', line 13 def initialize(start, destination) @start = start @destination = destination @hints = [] end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
9 10 11 |
# File 'lib/software_challenge_client/drag_move.rb', line 9 def destination @destination end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
8 9 10 |
# File 'lib/software_challenge_client/drag_move.rb', line 8 def start @start end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/software_challenge_client/drag_move.rb', line 19 def to_s "[Move: Drag from #{start} to #{destination}]" end |