Charles MINC > Chess-GameClock-GameClock > GameClock

Download:
Chess-GameClock-GameClock-1.0.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.2   Source  

FUNCTIONS ^

new

Create object of GameClock

set

Set the parameters of the GclkCounter with or without GUI.

display

Embedded &GclkDisplay::display

NAME ^

GameClock - Chess and Go clock

VERSION ^

Version 1.2

SYNOPSIS ^

use strict ;

use Tk ;

use Chess::GameClock::GclkDisplay qw(display);

use Chess::GameClock::GameClock ;

#Three Modes for settings counters:

#With Gui to set the time (no parameters):

my ($whites,$blacks)=$clock->set ;

# or from the GUI like menu

# here the set is Blitz,Usuel, 10mn (indice 1)

my ($whites,$blacks)=$clock->set("Blitz Usuel 1") ;

# or a direct cadence with the following

#array of hashes

# first cadence 15 mn/25 moves then 15 mn dead time

our ($whites,$blacks)=$clock->set( [{qw/ct 15*60 mv 25 b 0 f 0 byo 1/},

                                   {qw/ct 15*60 mv 0 b 0 f 0 byo 1/}] ) ;

# example of japonese byo-yomi

# main time 7s, then 3s per move and five byo-yomi time periods

#my ($whites,$blacks)=$clock->set( # [{qw/ct 7 mv 0 b 0 f 0 byo 0/}, # {qw/ct 3*5 mv 1 b 3 f 0 byo

# display the counters

&GclkDisplay::display($whites,$blacks,0.75) ;

# and at last the Perl/Tk necessary statement

MainLoop ;

DESCRIPTION ^

 The module Chess::GameClock  do the job of a Chess or Go electronic
 clock. You can set any types of cadences like Fisher, Bronstein,
 Byo-yomi selecting preset cadences or by manual interface. 
 The left and right mouse buttons are the clock buttons for whites
 & blacks. 
 The keyboard is also divided into two zones right and left who emulates
 the actions of the mouse, as an extended facility (letter h, at the keyboard
 center has been excluded). 
 The time counters are large on the screen and move counters are also
 displayed. The window could be adjusted with the "$scaling" parameter,
that is a floating number generally between 0.5 and 2.0 .

 The counter display has three commands only accessed by keyboard keys:

 Control-q , forces application to quit.

 Control-h , make counters to toggle between the counting and
 halt (pause)  mode. 

 Start accessed by Control-Shift-0, Start or Restart  the counters from the beginning.

 You can also toggling the display between the elapsed or remaining time with Alt-c.

Note: The window "Perl Chess Clock" must have the focus for that commands could be effective.

AUTHOR ^

Charles Minc, <charles.minc\ at wanadoo.fr>

BUGS ^

Please report any bugs or feature requests to bug-gameclock at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GameClock. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc GameClock

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2006 Charles Minc, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: