Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations
field.hpp File Reference

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"
Include dependency graph for field.hpp:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

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.

See also
Pawn
Coordinates
ANSISettings
Border
Cursor
Author
FLAK-ZOSO
Date
2022-2025
Version
3.0.0