frogger game revision
Dependencies: 4DGL-uLCD-SE MMA8452 SDFileSystem mbed wave_player
Fork of ECE2035_FroggerGame_SUM2015 by
cars/cars.h
- Committer:
- ssong86
- Date:
- 2016-02-01
- Revision:
- 9:47f07aa85f1a
- Parent:
- 8:1b6fc10c5cea
File content as of revision 9:47f07aa85f1a:
#include "mbed.h" //#include "cars.h" #include "map_public.h" #include "globals.h" //void clearCar(int lane); //void moveCar(int whichOne); // 1 -> lane 1. 2 -> lane 2 etc /// The enum defines the motion of the car typedef enum { CAR_UP=0, ///< move up CAR_DOWN, ///< move down } CAR_MOTION; typedef struct { unsigned int car_blk_x; ///< horizontal position in the grid unsigned int car_blk_y; ///< vertical position in the grid unsigned int car_color; ///< color of the car unsigned int lane; //car lane CAR_MOTION car_motion; ///< the motion of the car } car_t; void car_move(car_t * g, unsigned int new_blk_x, unsigned int new_blk_y); //A function to move the car //void drawCar(car_t * g, int grid_x, int grid_y); // @param lane @param color I don't think this function needs to be public void car_init(car_t * g); // Initialize a car void drive(car_t*); void collision();