require 'forwardable'

class Placement
  extend Forwardable

  def_delegator :pose, :report
  def_delegator :pose, :rotate!, :rotate

  def initialize(args)
    @board = args[:board]
    @pose = args[:pose]
  end

  def on_board?
    board && pose && board.valid_pose?(pose)
  end

  def update(a_new_pose)
    if board.valid_pose?(a_new_pose)
      self.pose = a_new_pose
    end
  end

  def advance
    update(pose.adjacent)
  end

  private

  attr_reader :board
  attr_accessor :pose
end

require 'forwardable'

class Placement
  extend Forwardable

  def_delegator :pose, :report
  def_delegator :pose, :rotate!, :rotate

  def initialize(args)
    @board = args[:board]
    @pose = args[:pose]
  end

  def on_board?
    board && board.valid_pose?(pose)
  end

  def update(a_new_pose)
    if board.valid_pose?(a_new_pose)
      self.pose = a_new_pose
    end
  end

  def advance
    update(pose.adjacent)
  end

  private

  attr_reader :board
  attr_accessor :pose
end

Move pose checking responsability away from Placement
Move pose checking responsability away from Placement

Placement checked for pose when asked if on_board?. This is not
part of its responsability.

In this commit, this responsability is delegated further down to
the board, object. That is Placement's expectation.
