Class: NoInterface

Inherits:
ConsoleInterface show all
Defined in:
lib/zombie-chaser/interface.rb

Instance Attribute Summary collapse

Attributes inherited from Interface

#human, #zombie_list

Instance Method Summary collapse

Methods inherited from ConsoleInterface

#finish_if_neccessary, #initialize, #interface_puts, #no_living_zombies_apart_from_me?, #something_happened, width, width=

Methods inherited from Interface

#finish_if_neccessary, #interface_puts

Constructor Details

This class inherits a constructor from ConsoleInterface

Instance Attribute Details

#representationsObject (readonly)

Returns the value of attribute representations.



112
113
114
# File 'lib/zombie-chaser/interface.rb', line 112

def representations
  @representations
end

Instance Method Details

#display_representation(representation) ⇒ Object



114
115
116
# File 'lib/zombie-chaser/interface.rb', line 114

def display_representation(representation)
  #Do nothing
end

#sleep(duration) ⇒ Object

No need to sleep for a mock interface



119
120
121
# File 'lib/zombie-chaser/interface.rb', line 119

def sleep(duration)
  super(duration/1000.0) * 1000.0 #Not sure if it's needed, but just to be on the safe side
end