dotfiles/.config/Code/User/History/-4cd684d9/mwt9.cpp

22 lines
368 B
C++
Raw Normal View History

2024-06-16 18:53:25 +05:00
#include "Food.h"
#include "util.h"
class GreenFood : public Food{
int height;
int width;
public:
GreenFood(int x, int y, float *color) : width(width), height(height), Food(x, y, color){}
void draw(){
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
}
void fall(){
y -= 5;
}
~GreenFood(){}
};