Class: DragMove

Inherits:
Object
  • Object
show all
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

Attributes included from HasHints

#hints

Instance Method Summary collapse

Methods included from HasHints

#add_hint

Constructor Details

#initialize(start, destination) ⇒ DragMove

Returns a new instance of DragMove.

Parameters:



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

#destinationObject (readonly)

Returns the value of attribute destination.



9
10
11
# File 'lib/software_challenge_client/drag_move.rb', line 9

def destination
  @destination
end

#startObject (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_sObject



19
20
21
# File 'lib/software_challenge_client/drag_move.rb', line 19

def to_s
  "[Move: Drag from #{start} to #{destination}]"
end