Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
chess
episode-05
Chess
Bishop
Board
CLIPresenter
Color
FinishDetector
Game
King
Knight
OutOfBounds
Pawn
Piece
Player
Position
Presenter
Queen
RandomPlayer
Rook
ImpossibleMove
Generated using Crystal 1.14.0
2024-11-26 10:44:44 UTC
class
Chess::
RandomPlayer
Chess::RandomPlayer
Chess::Player
Reference
Object
Defined in:
players/random.cr
Constructors
.new
(color : Color)
Instance Method Summary
#play
(board : Board, pieces : Array(Piece)) : Tuple(Piece, Position)
#yield?
: Bool
Instance methods inherited from class
Chess::Player
play(board : Board, pieces : Array(Piece)) : Tuple(Piece, Position)
play
,
yield? : Bool
yield?
Constructor Detail
def self.
new
(color :
Color
)
#
[
View source
]
Instance Method Detail
def
play
(board :
Board
, pieces : Array(
Piece
)) : Tuple(
Piece
,
Position
)
#
[
View source
]
def
yield?
: Bool
#
[
View source
]