Extension.

Content

  1. Short software description and download section
  2. PDN format
  3. Applet usage

Short software description and download section.

The extension is an archive, that shows many features and addition functionality of the Checkersland PC program. The extension works on all supported Operation Systems and contains the next: three external look and feels, internationalization files, PDN files and an example of skin creation.

Software information:

  • Version: 3.7
  • Release date: 26.01.2010
  • Size: 2.5 Mb

Download: extension.zip

Look and feels.

There are a lot of look and feels (LaF later) for programs written in java. The lafs directory contains the most known three LaFs: jgoodies, napkin and substance. If you run a command file with the bat extension (on Windows) or with the sh extension (for other Operation Systems), you will see the Checkersland program with a new interface style.

LaF: jgoodies

LaF: napkin

LaF: substance

Interface of the program translation.

After every start the program searchs in the languages directory for files with new languages and loads them. Name of files should be like i18n_XX.properties (here XX is a two chars language code). A file content should be in utf-8 encoding. All succesfully downloaded languages will be added into the language list of the settings window. The most easy way to create new translation by cloning and changing the i18n_en.properties file. This file with other existing translations is available in extension. In those files new resource strings can be added or changed existing ones. Such strings will be marked by ###.

Board skins.

After every start the Checkersland program loads skins from the skins directory. Every skin should be in a separated directory and consist of a set of images and the skin.ini file with additional settings. Extension contains a skin example with detail information. After loading all loaded skins are available in the list of skin types.

Skin: example

Skin: web

PDN format.

PDN (Portable Draughts Notation) is the most popular format for storing games in text files. It allows to keep a lot of games in a single file. Moreover every game may contain many additional information: players' names, the name of tournament, the place and date of the game etc. The details of this format are available here: http://en.wikipedia.org/wiki/Portable_Draughts_Notation.

The Checkersland program allows to watch a loaded PDN file as a list of games and edit it. Some games in the games list can be highlighted: red - game data is incomplete (e.g. kind of checkers is absent) or game history is invalid, blue - game data was changed and therefore will be modified while saving.

There is special view mode of round-robin tournaments. The program can restore crosstable of tournament and paints it in initial state. An example with such tournaments is available in the pdn/towers/SPb_open.pdn file of extension. The program allows to load any game from the list or from the crosstable, watch it, edit and store changings.

There are many programs that support PDN format. Also there are huge number of PDN files for different kind of checkers. Usually, such files don't contain information about destination kind of checkers. In this case all games will be highlighted by red color after file loading. To avoid this you should set a default kind of checkers for PDN files (Options > Settings > PDN files > Game type). This setting doesn't affect storing of PND files, and kind of checkers is always stored.

Applet usage.

You can use applet on your site in case you want to demonstrate any games. For this purpose you should insert the next code in a page:

<applet code="ppa.checkersland.applet.Main.class"
    width="578" height="524"
    archive="http://checkersland.com/download/checkersland-applet.jar">
  <param name=language value="en">
  <param name=color value="cccccc">
  <param name=notation value="around">
  <param name=movehighlighters value="false">
  <param name=rotateboard value="true">
  <param name=pdn value="[Date '2009.05.17']\n
    [White 'Ivanov']\n[Black 'Petrov']\n
    [Result '0-1']\n[GameType '25']\n
    1. c3-d4 d6-c5 2. b2-c3 f6-g5 3. c3-b4 g5-h4 4. b4xd6 e7xc5\n
    {It's a well known opening} 5. d2-c3 g7-f6 6. g3-f4 f6-g5\n
    7. c1-b2 f8-g7 8. c3-b4? {Losing move} h4-g3! 9. b4xd6 (9. f2xf6\n
    g7xa5 {White losed one draught} 0-1) 9. ... g3xc3 10. b2xd4\n
    c7xc3 11. e3-f4 g5xe3 12. f2xb2 {White losed one draught} 0-1">
  Your browser doesn't support java.
</applet>

The next parameters are used:

  • width and height - applet width and height on the page. For any kind of checkers the minimal size can be calculated:
    width = 222 + 36 * N
    height = 168 + 36 * N
    where N is the board size. It's easy to determine that the size of applet for all kinds of checkers is 654x600.
  • language - interface language. See additional information in interface of the program translation chapter
  • color - the color of applet background. Value format is RRGGBB, where RR - red, GG - green, BB - blue
  • notation - kind of visual notation representation. There are two values:
    around - notation around the board
    onboard - notation on board squares
    You should add to applet width and height 68 in case you use notation around the board
  • movehighlighters - highlighting available moves in current position. Value should be true or false
  • pdn - game data in PDN format, where all double quotes are replaced by single quotes and the chars \n are used instead of end of lines
  • rotateboard - rotate board. Works only if the pdn parameter is set.

After inserting example you will see the next applet:

Your browser doesn't support java.