drzel/another_toy_robot

View on GitHub
lib/another_toy_robot/null_position.rb

Summary

Maintainability
A
0 mins
Test Coverage
class NullPosition
  attr_reader :x_coord, :y_coord, :direction

  def initialize
    @x_coord   = nil
    @y_coord   = nil
    @direction = nil
  end

  def to_s
    "No position"
  end

  def advance
    self
  end

  def left
    self
  end

  def right
    self
  end
end