#include"objects.h" #include Objects::Objects() { max = 100; position = 0; for(int i=0;i<100;i++) { obj[i] = NULL; } } int Object::getWidth(){return width;} int Object::getHeight(){return height;} int Object::getX(){return x;} int Object::getY(){return y;} void Object::setWidth(int w){width = w;} void Object::setHeight(int h){height= h;} void Object::setX(int x){this->x = x;} void Object::setY(int y){this->y = y;} int Object::ID() { return 0; } void Objects::add(lpObject obj) { if(position<=max) { this->obj[position] = obj; position++; } } lpObject Objects::get(int num) { if(position >= max) { return NULL; }else { return obj[num]; } }