From a91544d04ed391bbdc0c6f95ff8a80d35190788c Mon Sep 17 00:00:00 2001 From: leseb Date: Mon, 15 Apr 2002 22:40:28 +0000 Subject: New directory structure --- (limited to 'noncore/games/kpacman/fruit.h') diff --git a/noncore/games/kpacman/fruit.h b/noncore/games/kpacman/fruit.h new file mode 100644 index 0000000..fbbd9c0 --- a/dev/null +++ b/noncore/games/kpacman/fruit.h @@ -0,0 +1,53 @@ +#ifndef FRUIT_H +#define FRUIT_H + +#include + +#include "board.h" + +enum fruitState { inactive, active, eaten }; + +class Fruit { +public: + Fruit(Board *b); + void setEaten(int duration); + void setLevel(int level, int wDuration, int fDuration, int ticks = -1); + void setMaxPixmaps(int max); + void setMovement(int entry, int tunnel, int iq); + void setPosition(int pos); + void setDirection(int dir); + fruitState state(); + int position(); + int direction(); + bool move(bool activate=FALSE); + int pix(); + +private: + Board *board; + + int IQ; // Intelligence of movement (0 = dumb..180=smart) + + fruitState actualState; // the state of fruit + + int pauseDuration; // number of ticks before next movement + int pause; // actual ticks before movement (0 = move) + + int timeLeft; // Ticks remaining of current state + + int waitDuration; // Time before fruit appears + int fruitDuration; // Length of active-time in ticks + + int actualDirection; // actual direction of the fruit + int actualPosition; // actual position on board + int lastPosition; // the last position of the fruit + int actualLevel; // level for kind of fruit and score + int actualPix; + int maxPixmaps; // Number of Pixmaps (1..) + + int entryPosition; // where to come in + int homePosition; // where to go, on the way in + int tunnelPosition; // where to exit +}; + +#endif // FRUIT_H + -- cgit v0.9.0.2