ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

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