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-27
- Revision:
- 61:3714af9caab6
- Parent:
- 53:b6bb4dab7823
File content as of revision 61:3714af9caab6:
#ifndef VEHICLE_H #define VEHICLE_H const int frog_state_up[4][6] = { //final and initial state of frog { 1, 0, 1, 1, 0, 1 }, { 0, 1, 1, 1, 1, 0 }, { 0, 1, 1, 1, 1, 0 }, { 1, 0, 0, 0, 0, 1 }, }; const int frog_state_left[4][6] = { // middle state of frog { 1, 1, 0, 0, 1, 0 }, { 0, 1, 1, 1, 1, 1 }, { 0, 1, 1, 1, 1, 1 }, { 1, 1, 0, 0, 1, 0 }, }; const int frog_state_right[4][6] = { // middle state of frog { 0, 1, 0, 0, 1, 1 }, { 1, 1, 1, 1, 1, 0 }, { 1, 1, 1, 1, 1, 0 }, { 0, 1, 0, 0, 1, 1 }, }; const int frog_state_down[4][6] = { // middle state of frog { 1, 0, 0, 0, 0, 1 }, { 0, 1, 1, 1, 1, 0 }, { 0, 1, 1, 1, 1, 0 }, { 1, 0, 1, 1, 0, 1 }, }; // B const int bus[4][16] = { // bus has a longer width { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0 }, }; // R const int right_racer[4][12] = { { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, { 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1 }, { 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1 }, { 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0 }, }; // L const int left_racer[4][12] = { { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 }, { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1 }, { 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1 }, { 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 }, }; // N const int right_normal[4][10] = { { 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, 1, 1, 1 }, { 1, 1, 0, 1, 1, 0, 1, 1, 1, 1 }, { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 }, }; // X const int left_normal[4][10] = { { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0 }, { 1, 1, 1, 0, 0, 0, 0, 0, 0, 1 }, { 1, 1, 1, 0, 1, 1, 1, 0, 1, 1 }, { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, }; const int star[4][12] = { { 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1 }, { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1 }, { 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1 }, { 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0 }, }; #endif