Exception: JustXiangqi::NoLegalMovesError

Inherits:
Error
  • Object
show all
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

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")

Parameters:

  • [String] (Hash)

    a customizable set of options



18
19
20
# File 'lib/just_xiangqi/errors/no_legal_moves_error.rb', line 18

def initialize(message="Piece cannot move from that square.")
  super
end