Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Pacman Class Reference

#include </home/clem/local/src/opie/noncore/games/kpacman/pacman.h>

Collaboration diagram for Pacman:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Pacman (Board *b)
void init (bool Demo=FALSE)
void setMaxPixmaps (int max)
void setAlive (int ticks)
void setPosition (int pos)
void setDirection (int dir, bool forced=FALSE)
void setDemo (bool yes)
pacmanState state ()
int position ()
int direction ()
bool move ()
int pix ()

Private Attributes

Boardboard
pacmanState actualState
bool demo
int pauseDuration
int pause
int actualDirection
int nextDirection
int lastPix
int maxPixmaps
int actualPosition
int lastPosition
int mouthPosition

Constructor & Destructor Documentation

Pacman::Pacman Board b  ) 
 

Definition at line 3 of file pacman.cpp.

References actualPosition, board, FALSE, lastPix, lastPosition, maxPixmaps, mouthPosition, OUT, setAlive(), and setDemo().


Member Function Documentation

int Pacman::direction  ) 
 

Definition at line 74 of file pacman.cpp.

References actualDirection.

Referenced by Referee::introPlay().

void Pacman::init bool  Demo = FALSE  ) 
 

bool Pacman::move  ) 
 

Definition at line 79 of file pacman.cpp.

References actualDirection, actualPosition, board, d, demo, empty, FALSE, Board::isWay(), lastPosition, maxPixmaps, mouthPosition, Board::move(), nextDirection, OUT, pacman, pause, pauseDuration, Board::reset(), Board::set(), TRUE, tunnel, Board::turn(), and X.

Referenced by Referee::timerEvent().

int Pacman::pix  ) 
 

Definition at line 133 of file pacman.cpp.

References actualDirection, actualPosition, E, lastPix, maxPixmaps, mouthPosition, N, OUT, S, W, and X.

Referenced by Referee::paintEvent(), setDirection(), setMaxPixmaps(), and Referee::timerEvent().

int Pacman::position  ) 
 

Definition at line 69 of file pacman.cpp.

References actualPosition.

Referenced by Referee::eaten(), Referee::introPlay(), Referee::killedPlay(), Referee::levelUp(), Referee::levelUpPlay(), Referee::paintEvent(), Referee::repaintFigures(), Referee::start(), and Referee::timerEvent().

void Pacman::setAlive int  ticks  ) 
 

Definition at line 31 of file pacman.cpp.

References actualState, alive, pause, and pauseDuration.

Referenced by Referee::initPacman(), and Pacman().

void Pacman::setDemo bool  yes  ) 
 

Definition at line 59 of file pacman.cpp.

References demo.

Referenced by Referee::initPacman(), Referee::introPlay(), and Pacman().

void Pacman::setDirection int  dir,
bool  forced = FALSE
 

Definition at line 46 of file pacman.cpp.

References actualDirection, actualPosition, board, empty, Board::isWay(), lastPix, nextDirection, pix(), tunnel, and X.

Referenced by Referee::initPacman(), Referee::keyPressEvent(), and Referee::killed().

void Pacman::setMaxPixmaps int  max  ) 
 

Definition at line 14 of file pacman.cpp.

References actualDirection, lastPix, maxPixmaps, mouthPosition, pix(), and X.

Referenced by Referee::initPacman(), and Referee::setScheme().

void Pacman::setPosition int  pos  ) 
 

Definition at line 38 of file pacman.cpp.

References actualPosition, board, lastPosition, mouthPosition, pacman, Board::reset(), and Board::set().

Referenced by Referee::initPacman(), Referee::introPlay(), and Referee::levelUp().

pacmanState Pacman::state  ) 
 

Definition at line 64 of file pacman.cpp.

References actualState.


Member Data Documentation

int Pacman::actualDirection [private]
 

Definition at line 36 of file pacman.h.

Referenced by direction(), move(), pix(), setDirection(), and setMaxPixmaps().

int Pacman::actualPosition [private]
 

Definition at line 40 of file pacman.h.

Referenced by move(), Pacman(), pix(), position(), setDirection(), and setPosition().

pacmanState Pacman::actualState [private]
 

Definition at line 30 of file pacman.h.

Referenced by setAlive(), and state().

Board* Pacman::board [private]
 

Definition at line 28 of file pacman.h.

Referenced by move(), Pacman(), setDirection(), and setPosition().

bool Pacman::demo [private]
 

Definition at line 31 of file pacman.h.

Referenced by move(), and setDemo().

int Pacman::lastPix [private]
 

Definition at line 38 of file pacman.h.

Referenced by Pacman(), pix(), setDirection(), and setMaxPixmaps().

int Pacman::lastPosition [private]
 

Definition at line 41 of file pacman.h.

Referenced by move(), Pacman(), and setPosition().

int Pacman::maxPixmaps [private]
 

Definition at line 39 of file pacman.h.

Referenced by move(), Pacman(), pix(), and setMaxPixmaps().

int Pacman::mouthPosition [private]
 

Definition at line 42 of file pacman.h.

Referenced by move(), Pacman(), pix(), setMaxPixmaps(), and setPosition().

int Pacman::nextDirection [private]
 

Definition at line 37 of file pacman.h.

Referenced by move(), and setDirection().

int Pacman::pause [private]
 

Definition at line 34 of file pacman.h.

Referenced by move(), and setAlive().

int Pacman::pauseDuration [private]
 

Definition at line 33 of file pacman.h.

Referenced by move(), and setAlive().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:44:10 2005 for OPIE by  doxygen 1.4.2