ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

Dependencies:   mbed

Frog/Chicken.cpp

Committer:
el19tb
Date:
2020-05-07
Revision:
5:6e3afee7eac3

File content as of revision 5:6e3afee7eac3:

#include "Chicken.h"
 
Serial pc(USBTX, USBRX);

//every chicken object will accept x, y, and width (square)
Chicken::Chicken(int x, int y, int width){
    this->x = x;
    this->y = y;
    this->width = width;
    
    left_side = x;
    right_side = width + x;
    up = y;
    down = width + y;
}