#ifndef FACE_H #define FACE_H #include #include class Face final { public: // force usage by reference in every situation Face(const Face& other) = delete; Face& operator=(const Face& other) = delete; Face(Face&& other) = delete; Face& operator=(Face&& other) = delete; int getX() const; int getY() const; int getZ() const; Face& getOpposite() const; const char* getName() const; static void forEach(const std::function& f); static const Face& UP; static const Face& DOWN; static const Face& NORTH; static const Face& SOUTH; static const Face& EAST; static const Face& WEST; private: Face(int index, int offsetX, int offsetY, int offsetZ, const char* name); static Face FACES[6]; int index; int offsetX; int offsetY; int offsetZ; const char* name; }; bool operator==(const Face& l, const Face& r); bool operator!=(const Face& l, const Face& r); std::ostream& operator<<(std::ostream& os, const Face& f); #endif