class JustChess::MovedIntoCheckError

MovedIntoCheckError

A moved into check error with a message

Public Class Methods

new(message="This move would leave the king in check.") click to toggle source

New moved into check errors can be instantiated with

@option [String] message

the message to display.

Example:

# Instantiates a new MovedIntoCheckError
JustChess::MovedIntoCheckError.new("Custom Message")
Calls superclass method JustChess::Error::new
# File lib/just_chess/errors/moved_into_check_error.rb, line 18
def initialize(message="This move would leave the king in check.")
  super
end