total reframe with classes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef PLAYER_H
|
||||
#define PLAYER_H
|
||||
#ifndef BALL_H
|
||||
#define BALL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "config.h"
|
||||
@@ -9,7 +9,11 @@ class Ball {
|
||||
uint8_t _x, _y;
|
||||
int8_t _direction_x, _direction_y;
|
||||
|
||||
void _init_directions(int8_t &_direction);
|
||||
|
||||
public:
|
||||
Ball (uint8_t _x, uint8_t _y) : _x(_x), _y(_y) {}
|
||||
|
||||
void move();
|
||||
void bounce_on_pad();
|
||||
void bounce_on_sides();
|
||||
|
||||
Reference in New Issue
Block a user