Brought over a bunch of code from the roguelike and now will use it to generate a random map.
This commit is contained in:
parent
8d3d3b4ec3
commit
2daa1c9bd5
59 changed files with 4303 additions and 411 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include "tser.hpp"
|
||||
|
||||
struct Point {
|
||||
size_t x = 0;
|
||||
|
@ -8,11 +9,13 @@ struct Point {
|
|||
bool operator==(const Point& other) const {
|
||||
return other.x == x && other.y == y;
|
||||
}
|
||||
|
||||
DEFINE_SERIALIZABLE(Point, x, y);
|
||||
};
|
||||
|
||||
typedef std::vector<Point> PointList;
|
||||
|
||||
struct PointHash {
|
||||
template<> struct std::hash<Point> {
|
||||
size_t operator()(const Point& p) const {
|
||||
return std::hash<int>()(p.x) ^ std::hash<int>()(p.y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue