shorthand names without being to short for clarity

This commit is contained in:
DarthMooMancer
2025-11-03 14:02:27 -05:00
parent 2c38da4b79
commit 1af33ba5a4
5 changed files with 57 additions and 59 deletions
+9 -9
View File
@@ -10,19 +10,19 @@ enum Direction {
RIGHT = 1
};
struct Point {
struct Vector2i {
int x, y;
char m_symbol;
char id;
enum Direction m_dir;
Point() : x(0), y(0), m_symbol('@') {}
Point(int x, int y, char s) : x(x), y(y), m_symbol(s) {}
void set_new_point(int x, int y);
Vector2i() : x(0), y(0), id('@') {}
Vector2i(int x, int y, char s) : x(x), y(y), id(s) {}
void set(int x, int y);
};
int get_score();
void determine_index_zero_pos(Point** buffer);
void move_tail_indicies(Point** buffer);
void on_fruit_eaten(Point (*board)[COL], Point** buffer);
bool segment_overlap(Point** buffer);
void determine_index_zero_pos(Vector2i** buf);
void move_tail_indicies(Vector2i** buf);
void on_fruit_eaten(Vector2i (*board)[COL], Vector2i** buf);
bool segment_overlap(Vector2i** buf);
#endif // ELEMENT_HPP
+2 -2
View File
@@ -5,10 +5,10 @@
#include "element.hpp"
struct Window {
Point m_board[ROW][COL] = {};
Vector2i board[ROW][COL] = {};
void clear_display();
void draw_display(int milliseconds);
void update_display(Point** buffer);
void update_display(Vector2i** buf);
};
#endif // WINDOW_HPP