CellBasedGame
Class Cell

java.lang.Object
  |
  +--CellBasedGame.Cell
Direct Known Subclasses:
JBombCell

public abstract class Cell
extends java.lang.Object

Classe astratta che definisce le funzioni base di una Cell in un CellBasedGame

Author:
Marco Mastropaolo (marco.mastropaolo@libero.it / st971422@educ.di.unito.it)

Field Summary
protected  CellBasedGame m_Game
          Il CellBasedGame a cui appartiene questa Cell
protected  int m_nX
          La coordinata X nel mondo del CellBasedGame
protected  int m_nY
          La coordinata Y nel mondo del CellBasedGame
 
Constructor Summary
Cell(CellBasedGame Game, int nX, int nY)
          Costruisce un nuovo oggetto Cell
 
Method Summary
protected  void changeSelf(Cell newcell)
          Cambia la Cell corrente con una nuova Cell
abstract  boolean isAWall(DynamicObject obj)
          Funzione che restituisce true se la cella blocca un dato DynamicObject
abstract  void paint(java.awt.Graphics g)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_Game

protected CellBasedGame m_Game
Il CellBasedGame a cui appartiene questa Cell

m_nX

protected int m_nX
La coordinata X nel mondo del CellBasedGame

m_nY

protected int m_nY
La coordinata Y nel mondo del CellBasedGame
Constructor Detail

Cell

public Cell(CellBasedGame Game,
            int nX,
            int nY)
Costruisce un nuovo oggetto Cell
Parameters:
Game - Il CellBasedGame a cui appartiene questa Cell
nX - La coordinata X nel mondo del CellBasedGame
nY - La coordinata Y nel mondo del CellBasedGame
Method Detail

changeSelf

protected void changeSelf(Cell newcell)
Cambia la Cell corrente con una nuova Cell
Parameters:
newcell - La nuova Cell che andrà a sostituire quella corrente

isAWall

public abstract boolean isAWall(DynamicObject obj)
Funzione che restituisce true se la cella blocca un dato DynamicObject
Parameters:
obj - Il DynamicObject su cui verificare il possibile passaggio
Returns:
true se la cella blocca un dato DynamicObject

paint

public abstract void paint(java.awt.Graphics g)