Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
TileSlotMap::TileOccupancy Struct Reference
+ Collaboration diagram for TileSlotMap::TileOccupancy:

Public Member Functions

int acquire ()
 
void release (int slotIndex)
 

Public Attributes

std::array< bool, 8 > occupied = {}
 

Detailed Description

Definition at line 50 of file TileSlotMap.hpp.

Member Function Documentation

◆ acquire()

int TileSlotMap::TileOccupancy::acquire ( )

First free slot, set it occupied and return its index. If all 8 are taken, picks rand()%8 (overlap fallback, bit already set).

Definition at line 18 of file TileSlotMap.cpp.

References occupied.

◆ release()

void TileSlotMap::TileOccupancy::release ( int  slotIndex)

Clears occupied[slotIndex].

Definition at line 32 of file TileSlotMap.cpp.

Member Data Documentation

◆ occupied

std::array<bool, 8> TileSlotMap::TileOccupancy::occupied = {}

Definition at line 51 of file TileSlotMap.hpp.

Referenced by acquire().


The documentation for this struct was generated from the following files: