Chess::Game::MoveListChess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game. | |
Download |
Chess::Game::MoveList Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Brian Richardson
- Publisher web site:
- http://search.cpan.org/~bjr/Chess-0.6.0/lib/Chess/Game/MoveList.pm
Chess::Game::MoveList Tags
Chess::Game::MoveList Description
Chess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game. Chess::Game::MoveList is a specialized list class for recording the moves of a Chess::Game.SYNOPSIS $movelist = Chess::Game::MoveList->new("white", "black"); $wpawn = Chess::Game::Pawn->new("e2", "white"); $entry = $movelist->add_move($wpawn, "e2", "e4"); $true = $entry->get_piece() eq $entry; $bpawn = Chess::Game::Pawn->new("e7", "black"); $entry = $movelist->add_move($bpawn, "e7", "e6"); $entry = $movelist->add_move($wpawn, "e4", "e5"); @del_entries = $movelist->delete_move(1, "white"); # delete the list $true = $entries->get_piece() eq $wpawn; $true = $entries->get_dest_square() eq "e4"; $true = $entries->get_piece() eq $bpawn; $true = $entries->get_dest_square() eq "e6";The Chess module provides a framework for writing chess programs with Perl. This class forms part of that framework, recording a log of all moves during a Chess::Game in such a fashion that the list can be used to undo moves that have been made. Requirements: · Perl
Chess::Game::MoveList Related Software