Untitled
unknown
plain_text
a year ago
3.4 kB
7
Indexable
Never
// Ghost.h #pragma once #include "Character.h" class Ghost : Character { public: Ghost(); ~Ghost(); string GetColor(); void SetColor(); Position GetPosition(); void SetPosition(); void Move(); void Chaos(); void ChangeDirection(); void EatPacman(); bool IsAtIntersection(); private: string _color; Position _gPosition; bool _isChaos; }; Ghost::Ghost() { } Ghost::~Ghost() { } // Pacman.h #pragma once #include "Character.h" class Pacman : Character { public: Pacman(); ~Pacman(); void EatPill(); void EatGhost(); void Move(); private: bool _hasPower; int _numOfPillsEaten; int _activationTime; }; Pacman::Pacman() { } Pacman::~Pacman() { } // Wall.h #pragma once #include "Tile.h" class Wall : Tile { public: Wall(); ~Wall(); private: Position _wPos; }; Wall::Wall() { } Wall::~Wall() { } // Pill.h #pragma once #include "Tile.h" class Pill : Tile { public: Pill(); ~Pill(); private: Position _pPos; bool _isPower; }; Pill::Pill() { } Pill::~Pill() { } enum DIRECTION {UP, RIGHT, DOWN, LEFT}; class Controller { public: Controller(); ~Controller(); private: }; Controller::Controller() { } Controller::~Controller() { } class Game { public: Game(); ~Game(); private: }; Game::Game() { } Game::~Game() { } // Character #pragma once #include "Position.h" #include <string> class Character { public: Character(); ~Character(); void SetCharacterPos(Position characterPos); void SetDirection(int direction); void SetSpeed(int speed); Position GetCharacterPos(); int GetDirection(); int GetSpeed(); virtual void Move(); virtual bool IsFacingBlock(); void GetCurrentPos(); private: Position _characterPos; int _direction, _speed; }; Character::Character() { } Character::~Character() { } // Tile #pragma once #include "Position.h" class Tile { public: Tile(); ~Tile(); void SetTilePosition(Position tilePos); void SetHeight(int height); void SetWeight(int weight); void SetIsWall(bool isWall); void SetIsPill(bool isPill); void SetIsPillPower(bool isPillPower); void SetIsGhost(bool isGhost); void SetIsPacman(bool isPacman); Position GetTilePosition(); int GetHeight(); int GetWeight(); bool GetIsWall(); bool GetIsPill(); bool GetIsPillPower(); bool GetIsGhost(); bool GetIsPacman(); private: Position _tilePos; int _height, _weight; bool _isWall, isPill, isPillPower, isGhost, isPacman; }; Tile::Tile() { } Tile::~Tile() { } // Position.h #pragma once #include <iostream> using namespace std; class Position { public: Position(); ~Position(); void SetX(int x); void SetY(int y); int GetX(); int GetY(); private: int _x, _y; }; Position::Position() { } Position::~Position() { } // Maze.h #include <list> #include <iostream> #include "Wall.h" #include "Pill.h" #include "Character.h" using namespace std; class Maze { public: Maze(); ~Maze(); void SetHeight(int height); void SetWeight(int weight); int GetHeight(); int GetWeight(); private: int _HEIGHT, _WEIGHT, _fps; list<Tile> ListTile; list<Character> ListCharacter; list<Pill> ListPill; }; Maze::Maze() { } Maze::~Maze() { }