#ifndef WORLD_WORLD_HPP #define WORLD_WORLD_HPP #include #include class float2; class MarchingSquares { public: enum CellType { FREE, SOLID, DESTROYABLE }; MarchingSquares(); void ReadImage(const std::string& filename); std::vector< std::pair > RunMarchingSquares(); private: int getMaskAt(int x, int y) const; void visitPoint(int x, int y, int mask, std::vector& visited, std::vector< std::pair >& lines) const; std::size_t width_; std::size_t height_; std::vector cells_; }; #endif // WORLD_WORLD_HPP