Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
|
This file contains the Field class and related structures. More...
#include <vector>
#include <memory>
#include <map>
#include <set>
#include "pawn.hpp"
#include "border.hpp"
#include "cursor.hpp"
Go to the source code of this file.
Classes | |
class | sista::Field |
Represents a 2D grid where Pawns can be placed, moved, and managed. More... | |
struct | sista::Path |
Represents a movement path for a Pawn, including priority handling. More... | |
struct | std::hash< sista::Path > |
Specialization of std::hash for sista::Path to allow usage in unordered containers. More... | |
class | sista::SwappableField |
A specialized Field that handles Pawn swaps without conflicts. More... | |
Namespaces | |
namespace | sista |
Sista library namespace. | |
namespace | std |
Enumerations | |
enum class | sista::Effect { sista::PACMAN = 0 , sista::MATRIX = 1 } |
Enumeration for handling out-of-bounds coordinates. More... | |
This file contains the Field class and related structures.
This file contains the core functionalities of the Sista library.
The Field class represents a 2D grid where Pawns can be placed, moved, and managed. It provides methods to add, remove, move, and print Pawns on the field. The Field class also handles boundary conditions and occupancy checks.
Additionally, the SwappableField subclass extends Field to handle scenarios where multiple Pawns may need to swap positions without conflicts.
The Path structure is used to represent movement paths for Pawns, including priority handling.