Exception: JustXiangqi::NoLegalMovesError
- Defined in:
- lib/just_xiangqi/errors/no_legal_moves_error.rb
Overview
NoLegalMovesError
A no legal moves error with a message
Instance Method Summary collapse
-
#initialize(message = "Piece cannot move from that square.") ⇒ NoLegalMovesError
constructor
New no legal moves errors can be instantiated with.
Constructor Details
#initialize(message = "Piece cannot move from that square.") ⇒ NoLegalMovesError
New no legal moves errors can be instantiated with
Example:
# Instantiates a new NoLegalMovesError
JustXiangqi::NoLegalMovesError.new("Custom Message")
18 19 20 |
# File 'lib/just_xiangqi/errors/no_legal_moves_error.rb', line 18 def initialize(="Piece cannot move from that square.") super end |