total reframe with classes

This commit is contained in:
andrea
2026-03-17 23:25:30 +01:00
parent d8efabd6da
commit 3d8881ab3d
14 changed files with 246 additions and 319 deletions

View File

@@ -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();