class JustShogi::NoLegalMovesError
NoLegalMovesError
¶ ↑
A no legal moves error with a message
Public Class Methods
new(message="Piece cannot move from that square.")
click to toggle source
New no legal moves errors can be instantiated with
@option [String] message
the message to display.
Example:¶ ↑
# Instantiates a new NoLegalMovesError JustShogi::NoLegalMovesError.new("Custom Message")
Calls superclass method
JustShogi::Error::new
# File lib/just_shogi/errors/no_legal_moves_error.rb, line 18 def initialize(message="Piece cannot move from that square.") super end