Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Sprite/Vehicle.h
- Committer:
- el19tb
- Date:
- 2020-05-13
- Revision:
- 13:cd6d2f999057
- Child:
- 14:6fe667ec957e
File content as of revision 13:cd6d2f999057:
#ifndef VEHICLE_H
#define VEHICLE_H
// size of grid of the game
// three states of the frog
// still, movement 1 , movement two
const int frog_states[4][6][3] = {
{
//final and initial state of frog
{ 0, 1, 0, 0, 1, 0 },
{ 0, 1, 1, 1, 1, 0 },
{ 0, 1, 1, 1, 1, 0 },
{ 0, 1, 0, 0, 1, 0 }
},
{
// second state of frog
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 0, 0, 0 }
},
{
// third state of frog
{ 1, 0, 0, 0, 0, 1 },
{ 0, 1, 1, 1, 1, 0 },
{ 0, 1, 1, 1, 1, 0 },
{ 1, 0, 0, 0, 0, 1 }
}
};
int left_racer[4][4] = {
{ 0, 1, 1, 0 },
{ 1, 1, 1, 0 },
{ 1, 1, 1, 0 },
{ 0, 1, 1, 0 },
};
int right_racer[4][4] = {
{ 0, 1, 1, 0 },
{ 0, 1, 1, 1 },
{ 0, 1, 1, 1 },
{ 0, 1, 1, 0 },
};
int right_normal[4][4] = {
{ 0, 0, 0, 0 },
{ 0, 1, 1, 1 },
{ 0, 1, 1, 1 },
{ 0, 0, 0, 0 },
};
int left_normal[4][4] = {
{ 0, 0, 0, 0 },
{ 1, 1, 1, 0 },
{ 1, 1, 1, 0 },
{ 0, 0, 0, 0 },
};
int bus[4][6] = {
// bus has a longer width
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 0, 0, 0 },
};
#endif