/* ***************************************************************************************** AUTHOR: Simona Pappalardo MAIL: pacana@libero.it * *****************************************************************************************/ import java.lang.*; import java.awt.*; public class Table { // this is the structure of every single little square. int occupato; int elemBaseX; int elemBaseY; int color[]; Table() { this.elemBaseX = 10; // size of piece's little square. this.elemBaseY = 10; this.color = new int[3]; this.color[0] = AppletEnglish.color.getRed(); this.color[1] = AppletEnglish.color.getGreen(); this.color[2] = AppletEnglish.color.getBlue(); this.occupato = 0; } public void fill(int[] cCode) { // set little square as busy and set as its color cCode. this.occupato = 1; this.color[0]=cCode[0]; this.color[1]=cCode[1]; this.color[2]=cCode[2]; } public void free() { // set little square as free and set as its color, the applet background color. this.occupato = 0; this.color[0]=AppletEnglish.color.getRed(); this.color[1]=AppletEnglish.color.getGreen(); this.color[2]=AppletEnglish.color.getBlue(); } }