Kwartik's Blog

March 28, 2010

Chess Openings : a simple PERL script to practise chess openings

Filed under: Perl — Tags: , — kwartik @ 1:43 pm

I have just released CHESS OPENINGS, a simple PERL script to practise chess openings. It is provided with a default configuration file containing a list of 437 famous openings. CHESS OPENINGS chooses randomly one opening in the configuration file and displays it as a nice UTF-8 matrix (UTF-8 do support chess characters). CHESS OPENINGS may be simply used through the command line but may be also be called by other tools like screen savers.

This script is intended to be used in a UTF-8 environment supporting chess characters. It has been successfully tested in a Linux terminal. Unfortunately, under Windows, the “terminal” (cmd.exe) is not able to print UTF-8 characters, so Windows users might need to use a two steps approach :

  1. redirection of the output in a file: perl chess-openings > opening.out
  2. edition of the output file with a UTF-8 compliant editor providing a nice font for chess characters

Chess fans may want to improve the code to add features (comments on the moves, …).

The script can be downloaded HERE. Enjoy !

Create a free website or blog at