Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Games::Checkers 0.1.0

    Download button

    No screenshots available
    Downloads: 365  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mikhael Goikhman | More programs
    Perl Artistic License / FREE
    January 4th, 2007, 02:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Games::Checkers description

    Games::Checkers is a Perl module that allows you to play the Checkers games.

    SYNOPSIS

    # automatical computer-vus-computer play script
    use Games::Checkers::Constants;
    use Games::Checkers::Board;
    use Games::Checkers::BoardTree;

    my $board = new Games::Checkers::Board;
    my $color = White;
    my $numMoves = 0;
    print $board->dump;

    while ($board->canColorMove($color)) {
    sleep(2);
    # allow 100 moves for each player
    die "Automatical drawn" if $numMoves++ == 200;
    my $boardTree = new Games::Checkers::BoardTree
    ($board, $color, 2); # think 2 steps ahead
    my $move = $boardTree->chooseBestMove; # or: chooseRandomMove

    $board->transform($move);
    print $move->dump, "n", $board->dump;
    $color = ($color == White)? Black: White;
    }

    print "n", ($color == White? "Black": "White"), " won.n";
    ABSTRACT ^
    Games::Checkers is a set of Perl classes implementing the Checkers game play. Several national rule variants are supported. A basic AI heuristics is implemented using the Minimax algorithm. Replay of previously recorded games is supported too.
    DESCRIPTION ^
    This package is intended to provide complete infrastructure for interactive and automatic playing and manipulating of Checkers games. Some features are not implemented yet.

    Product's homepage

      


    TAGS:

    play Checkers | Checkers games | Perl module | Games::Checkers | play | Checkers

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM