Refactor some code to have better naming and move Point and related point things into their own .hpp.

This commit is contained in:
Zed A. Shaw 2024-10-26 18:26:42 -04:00
parent c19cd707d1
commit 5a123ae74c
7 changed files with 45 additions and 40 deletions

11
map.hpp
View file

@ -5,6 +5,7 @@
#include <random>
#include <algorithm>
#include <fmt/core.h>
#include "point.hpp"
#define INV_WALL 0
#define INV_SPACE 1
@ -15,15 +16,6 @@
#define PLAYER_TILE "☺"
#define ENEMY_TILE "Ω"
struct Point {
size_t x = 0;
size_t y = 0;
bool operator==(const Point& other) const {
return other.x == x && other.y == y;
}
};
struct Room {
size_t x = 0;
size_t y = 0;
@ -33,7 +25,6 @@ struct Room {
Point exit;
};
typedef std::vector<Point> PointList;
typedef std::vector<int> MatrixRow;
typedef std::vector<MatrixRow> Matrix;