Exception: Chess::BadNotationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chess/exceptions.rb

Overview

This exception will be raised when an invalid short algebraic chess notation string is passed to the Game#move function.

Instance Method Summary collapse

Constructor Details

#initialize(notation) ⇒ BadNotationError

Returns a new instance of BadNotationError.

Parameters:

  • notation (String)

    The invalid notation.



6
7
8
# File 'lib/chess/exceptions.rb', line 6

def initialize(notation)
  super("Invalid notation '#{notation}'")
end