I am still new to this so I do not know how to fix the errors. When I compile, I keep getting the errors "Undefined reference to 'Pokeball::Pokeball()", "Undefined reference to 'Pokeball::draw(Plotter&)" and "Undefined reference to 'Pokeball::erase(Plotter&)". Can someone please tell me how to fix this?
[code]
#include "Game.h"
Game::Game()
{
active = true;
isOver = false;
powerUp = NO_POWER;
//Background
for(int r = 0; r < MAX_Y; r++)
{
for(int c = 0; c < MAX_X; c++)
{
if(r < MAX_Y - GROUND_HEIGHT)
{
screen.setColor(blue); //Sky
}
else if(r >= MAX_Y - GROUND_HEIGHT)
{
screen.setColor(darkred); //Ground
}
screen.plot(x+c, y+r, SQUARE);
}
}
x = y = 0;
}
void Game::title()
{
bool playGame = false;
int startKey;
//leMario
int leftmostPikachu = pika.getX();
int rightmostPikachu = pika.getX() + PIKACHU_WIDTH;
int topmostPikachu = pika.getY();
int lowermostPikachu = pika.getY() + PIKACHU_HEIGHT;
int leftmostMeow = meowster.getX();
int topmostMeow = meowster.getY();
int bottommostMeow = meowster.getY() + MEOWTH_ROW;
if(powerUp == NO_POWER)
{
//If leftmost or rightmost Mario are between the drink's left or rightmost.
if( (rightmostPikachu >= leftmostMeow) && (leftmostPikachu <= leftmostMeow) )
{ //Topmost or lowermost are between drink's top or bottom.
if( ((topmostPikachu <= topmostMeow) && (lowermostPikachu >= topmostMeow)) ||
( ((topmostPikachu <= bottommostMeow) && (lowermostPikachu >= bottommostMeow) )))
{ //Turn true!
flag = true;
}
}
}