Class: JustChess::MovedIntoCheckError
- Defined in:
- lib/just_chess/errors/moved_into_check_error.rb
Overview
MovedIntoCheckError
A moved into check error with a message
Instance Method Summary collapse
-
#initialize(message = "This move would leave the king in check.") ⇒ MovedIntoCheckError
constructor
New moved into check errors can be instantiated with.
Constructor Details
#initialize(message = "This move would leave the king in check.") ⇒ MovedIntoCheckError
New moved into check errors can be instantiated with
Example:
# Instantiates a new MovedIntoCheckError
JustChess::MovedIntoCheckError.new("Custom Message")
18 19 20 |
# File 'lib/just_chess/errors/moved_into_check_error.rb', line 18 def initialize(="This move would leave the king in check.") super end |