#include "hex.h"
#include <cassert>
#include <sstream>
Go to the source code of this file.
Namespaces | |
| namespace | hex |
Functions | |
| void | hex::go (int &i, int &j, Direction d, int distance=1) |
| Translates coordinates i,j in direction d. | |
| void | hex::go (int &i, int &j, const std::string &steps) |
| Translates coordinates i,j along steps. | |
| std::string | hex::steps (const Hex *from, const Hex *to) |
| Calculates a minimum-length path between two hexes. | |
| int | hex::distance (const Hex *from, const Hex *to) |
| The length of the shortest path between two hexes. | |
| std::set< Hex * > | hex::range (Hex *h, int distance) |
| Calculates the set of hexes that are range r from hex h. | |
| std::set< Hex * > | hex::set_difference (const std::set< Hex * > &a, const std::set< Hex * > &b) |
| The set difference between a and b. | |
| std::set< Hex * > | hex::set_intersection (const std::set< Hex * > &a, const std::set< Hex * > &b) |
| The set intersection between a and b. | |
| std::set< Hex * > | hex::set_union (const std::set< Hex * > &a, const std::set< Hex * > &b) |
| The set union between a and b. | |
| std::string | hex::set_str (const std::set< Hex * > &a) |
| Generates a string representation of hex-set a. | |
| bool | hex::bounding_box (const std::set< Hex * > &a, int &i0, int &j0, int &i1, int &j1) |
| Calculate a bounding box for hex-set a. | |
| Area | hex::fill (const std::set< Hex * > &beyond, Hex *h) |
| Calc. | |
| Area | hex::fill (const std::set< Hex * > &beyond, const Area &a) |
| Max. | |
| std::set< Hex * > | hex::extract_connected_set (std::set< Hex * > &s) |
| Helper: Find the connected set (Area) that contains the first hex in s. | |
| std::list< Area > | hex::areas (const std::set< Hex * > &s) |
| Find all of the Areas (connected sets) in s. | |
| bool | hex::is_connected (const std::set< Hex * > &s) |
| TRUE iff s is connected. | |
| std::list< Boundary > | hex::skeleton (const std::list< Area > &a, bool include_boundary=true) |
| The skeletons of areas a. | |
1.5.1