Sha256: fcb09cdd9f3a81d6d37524b92d649a8c7f6dd3328737eb1d6bd053336cdea0cb

Contents?: true

Size: 433 Bytes

Versions: 10

Compression:

Stored size: 433 Bytes

Contents

# encoding: UTF-8

# Exception indicating a move which was performed is not valid for the given
# state.
class InvalidMoveException < StandardError
  def initialize(msg, move_or_action)
    # This exception will be thrown by a move or by an individual action,
    # depending where the rule violation was detected.
    @move_or_action = move_or_action
    super(msg)
  end

  def message
    "#{super}: #{@move_or_action}"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
software_challenge_client-1.2.1 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-1.2.0 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-1.1.0 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-1.0.0 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.3.4 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.3.3 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.3.2 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.3.1 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.3.0 lib/software_challenge_client/invalid_move_exception.rb
software_challenge_client-0.2.0 lib/software_challenge_client/invalid_move_exception.rb