pt.ua.gboard.games
Class PacmanGelem

java.lang.Object
  extended by pt.ua.gboard.Gelem
      extended by pt.ua.gboard.OneColorGelem
          extended by pt.ua.gboard.games.PacmanGelem

public class PacmanGelem
extends OneColorGelem

Pacman gelem.

This class follows DbC(tm) methodology. Where possible, contracts are implement with JML and native's Java assert.

Author:
Miguel Oliveira e Silva (mos@ua.pt)

Constructor Summary
PacmanGelem(java.awt.Color color, double cellOccupation)
          Constructs a new PacmanGelem (1x1 cells).
PacmanGelem(java.awt.Color color, double cellOccupation, int numberOfLines, int numberOfColumns)
          Constructs a new PacmanGelem.
 
Method Summary
 
Methods inherited from class pt.ua.gboard.OneColorGelem
draw, erase
 
Methods inherited from class pt.ua.gboard.Gelem
height, intersects, isMutable, mutable, numberOfColumns, numberOfLines, width, x, y
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacmanGelem

public PacmanGelem(java.awt.Color color,
                   double cellOccupation)
Constructs a new PacmanGelem (1x1 cells).

requires: color != null && cellOccupation >= 0.0 && cellOccupation <= 100.0

Parameters:
color - gelem's color
cellOccupation - total cell's occupation (%)

PacmanGelem

public PacmanGelem(java.awt.Color color,
                   double cellOccupation,
                   int numberOfLines,
                   int numberOfColumns)
Constructs a new PacmanGelem.

requires: color != null && cellOccupation >= 0.0 && cellOccupation <= 100.0 && numberOfLines >= 1 && numberOfColumns >= 1

Parameters:
color - gelem's color
cellOccupation - total cell's occupation (%)
numberOfLines - number of lines
numberOfColumns - number of columns