LogicMinigame Class Reference
[Logic minigame]

Class for a single instance of a logic game. More...

#include <logicminigame.h>

Inherits GameController, and ClickListener.

Collaboration diagram for LogicMinigame:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LogicMinigame (LogicScenarioType scenario)
 ~LogicMinigame ()
void draw (BITMAP *canvas)
 This function will also be called each screen refresh to draw to the buffer.
void step ()
 This function will be called each time unit of the game.
void onClick (MouseEvent *e)
void onClick (MouseEvent *e, void *caller)
void addGate (int type, Point p)
 Attempt to add a new gate to the board at point p.
void makeConnection (LogicComponent *from, Point p)
 Attempt to make a connection from the given component to whatever is at point p.
bool isComplete ()
 This function can be called to check if the GameController is done.

Public Attributes

LogicLayoutlayout

Protected Member Functions

void reset ()
int checkTargets ()
void releaseWave ()
void setupGraphics (LogicScenario *scenario)

Static Protected Member Functions

static int permute (int i)

Protected Attributes

LayerminigameLayer
LayerplacementPoints
std::vector< LogicTarget * > targets
std::vector< LogicGenerator * > generators
std::vector< LogicComponent * > gates
int numWaves
std::vector< std::vector< int > > generatorSequence
std::vector< std::vector< int > > targetSequence
int mode
int timingCount
ButtongreenButton
ButtonredButton

Static Protected Attributes

static const int speedMultiplier = 3
static const int releaseTime = speedMultiplier * 20
static const int LightOverlayTransparency = 48
static const int PlacementTransparency = 200


Detailed Description

Class for a single instance of a logic game.

Constructor & Destructor Documentation

LogicMinigame::LogicMinigame ( LogicScenarioType  scenario  ) 

LogicMinigame::~LogicMinigame (  ) 


Member Function Documentation

void LogicMinigame::addGate ( int  type,
Point  p 
)

Attempt to add a new gate to the board at point p.

int LogicMinigame::checkTargets (  )  [protected]

void LogicMinigame::draw ( BITMAP *   )  [virtual]

This function will also be called each screen refresh to draw to the buffer.

Implements GameController.

bool LogicMinigame::isComplete (  )  [virtual]

This function can be called to check if the GameController is done.

Implements GameController.

void LogicMinigame::makeConnection ( LogicComponent from,
Point  p 
)

Attempt to make a connection from the given component to whatever is at point p.

void LogicMinigame::onClick ( MouseEvent e,
void *  caller 
) [virtual]

Reimplemented from ClickListener.

void LogicMinigame::onClick ( MouseEvent e  )  [inline, virtual]

Implements ClickListener.

int LogicMinigame::permute ( int  i  )  [static, protected]

void LogicMinigame::releaseWave (  )  [protected]

void LogicMinigame::reset (  )  [protected]

void LogicMinigame::setupGraphics ( LogicScenario scenario  )  [protected]

void LogicMinigame::step (  )  [virtual]

This function will be called each time unit of the game.

Implements GameController.


Member Data Documentation

std::vector<LogicComponent*> LogicMinigame::gates [protected]

std::vector<LogicGenerator*> LogicMinigame::generators [protected]

std::vector< std::vector<int> > LogicMinigame::generatorSequence [protected]

const int LogicMinigame::LightOverlayTransparency = 48 [static, protected]

int LogicMinigame::mode [protected]

int LogicMinigame::numWaves [protected]

const int LogicMinigame::PlacementTransparency = 200 [static, protected]

const int LogicMinigame::releaseTime = speedMultiplier * 20 [static, protected]

const int LogicMinigame::speedMultiplier = 3 [static, protected]

std::vector<LogicTarget*> LogicMinigame::targets [protected]

std::vector< std::vector<int> > LogicMinigame::targetSequence [protected]

int LogicMinigame::timingCount [protected]


The documentation for this class was generated from the following files:

Generated on Mon Mar 16 14:33:11 2009 for LearningGaming by  doxygen 1.5.7.1