Ransom Conant / Mbed 2 deprecated MbedPacman

Dependencies:   4DGL-uLCD-SE mbed wave_player

Fork of PacMan_Skeleton_unlock by ECE 2035 TA

Embed: (wiki syntax)

« Back to documentation index

pacman.h File Reference

pacman.h File Reference

Go to the source code of this file.

Data Structures

struct  PLAYER
 This struct contains the status of a pacman. More...

Enumerations

enum  PACMAN_STATUS
 

The enum defines the status of a pacman.

More...
enum  PACMAN_MOTION
 

The enum defines the motion of a pacman.

More...

Functions

int pacman_get_x (void)
 Resets the score for pacman.
void pacman_init (int grid_x, int grid_y)
 Initialize a pacman with given position.
void pacman_draw (void)
 Draw the pacman on the screen with different mouse direction base on current motion.
void pacman_set_action (PACMAN_MOTION motion)
 Set the pacman's motion according to the input mostion.

Detailed Description

Definition in file pacman.h.


Enumeration Type Documentation

The enum defines the motion of a pacman.

Definition at line 35 of file pacman.h.

The enum defines the status of a pacman.

Definition at line 29 of file pacman.h.


Function Documentation

void pacman_draw ( void   )

Draw the pacman on the screen with different mouse direction base on current motion.

Definition at line 62 of file pacman.cpp.

int pacman_get_x ( void   )

Resets the score for pacman.

Definition at line 36 of file pacman.cpp.

void pacman_init ( int  grid_x,
int  grid_y 
)

Initialize a pacman with given position.

The default mostion is PACMAN_HEADING_RIGHT and status is PACMAN_WAIT_COMMAND.

Parameters:
blk_xThe horizontal position in the grid.
blk_yThe vertical position in the grid.

Definition at line 49 of file pacman.cpp.

void pacman_set_action ( PACMAN_MOTION  motion )

Set the pacman's motion according to the input mostion.

Parameters:
motionThe desired pacman motion.

Definition at line 96 of file pacman.cpp.