Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
source/pala.h
- Committer:
- immou
- Date:
- 2020-05-17
- Revision:
- 1:2c86b5fb793a
- Child:
- 2:292e47672dbe
File content as of revision 1:2c86b5fb793a:
#ifndef PALA_H_
#define PALA_H_
#include <iostream>
#include "../globals.h"
using namespace std;
class Pala
{
public:
int x,y,w,h;
Pala(int x, int y, int w, int h) : x(x), y(y), w(w), h(h)
{
reset();
};
~Pala();
void reset();
void moveUp();
void moveDown();
void moveAuto(int bolapos);
};
void Pala::reset()
{
y = (MAP_HEIGHT / 2) - h/2;
}
void Pala::moveDown()
{
if(y > 1)
y -= 5;
};
void Pala::moveUp()
{
if(y + h < MAP_HEIGHT)
y += 5;
};
#endif
