The Game Toolbox

by Joćo Pedro Neto


The main idea is to provide a set of classes, like Game, Board, Player, in order to program all basic needs of a abstract game applet, like graphical primitives, undo/redo moves, copy/paste of diagrams, a popup menu with the possible options and so on... After extending the Game class (to implement the required game) and compiling the sources, the applet will work using the following format:

<applet
   codebase = "."
   code   = "toolbox.Connect4Applet.class"
   width  = "200" 
   height = "180"
   align  = "top">

  <param name=WIDTH  value="200">
  <param name=HEIGHT value="180">
  <param name=BACKG  value="back-kings.jpg">
  <param name=PIECES value="soldiers">
  <param name=CPU    value="1st">

</applet>

The applet is personalized using the previous parameters which give the width, height, the background image, the piece gif set and if the computer is the first or second to move. All the rest is automatic.

This initial test uses Connect4 as an example (two clicks or a double click to drop the stone at the correct cell). Connect4 is just the actual terminal class, it can be changed to another game. This Connect4 player was created by the LUDAE project, thru evolution. If you are interested to know more, please send an email.