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

Implementation of the field management functionalities of the Sista library. More...

#include "field.hpp"
#include <queue>
#include <algorithm>
#include <iostream>
Include dependency graph for field.cpp:

Namespaces

namespace  sista
 Sista library namespace.
 

Detailed Description

Implementation of the field management functionalities of the Sista library.

This file contains the implementation of the Field class and its methods for managing a 2D grid of Pawns. It includes methods for adding, removing, moving, and printing Pawns, as well as checking the state of the field (e.g., occupancy, bounds). The Field class uses std::shared_ptr for managing Pawn objects to ensure proper memory management and avoid memory leaks. The implementation also includes the SwappableField subclass, which extends Field to handle scenarios where multiple Pawns may need to swap positions.

Author
FLAK-ZOSO
Date
2022-2025
Version
3.0.0
See also
Field
SwappableField
Path