#ifndef CLASSES_H
#define CLASSES_H

#include <allegro.h>

extern struct BITMAP* buffer;

class bullet
{
    public:

    bullet(int xx, int yy)
    {
        x = xx;
        y = yy;
    }

    int x, y;
    void draw()
    {
        circlefill(buffer, x, y, 2, makecol(255,0,0));
    }
    void move()
    {
        x--;
    }
};

class player
{
    public:

    int x, y, health;
    BITMAP* img;

    void move()
    {
        if (key[KEY_UP] && y>0) y--;
        if (key[KEY_DOWN] && y<480) y++;
        if (key[KEY_RIGHT] && x<640) x++;
        if (key[KEY_LEFT] && x>0) x--;
    }
    void draw()
    {
        pivot_sprite(buffer, img, x, y, 15, 15, 0);
    }
};

#endif
