Raylib Bubbles
C++11 Raylib bubble shooter game.
GameBoard::BubbleCell Struct Reference

Represents a bubble cell on the game board. More...

#include <board.hpp>

Public Member Functions

 BubbleCell (size_t hue=0, size_t neighbors=0)
 Default constructor for the BubbleCell struct. More...
 
Operator overloads.
bool operator== (const BubbleCell &other) const
 
bool operator!= (const BubbleCell &other) const
 
void operator= (const size_t hue)
 

Public Attributes

size_t hue
 
size_t neighbors
 

Detailed Description

Represents a bubble cell on the game board.

This struct represents a bubble cell on the game board, which contains the hue of the bubble and the number of neighbors it has. The hue is used to determine the color of the bubble, while the neighbors are used to determine if the bubble is floating or not.

Note
This class has operator overloads for ==, !=, and =, which allow short-hand comparisons and assignments with the hue property.
See also
GameActionMgr

Constructor & Destructor Documentation

◆ BubbleCell()

GameBoard::BubbleCell::BubbleCell ( size_t  hue = 0,
size_t  neighbors = 0 
)
inline

Default constructor for the BubbleCell struct.

Parameters
hueThe hue of the bubble. Zero (default) is used to represent an empty cell.
neighborsThe number of connected bubbles the bubble has, on the grid. Zero is also the default.

This constructor initializes a BubbleCell struct with the given hue and number of neighbors. Being a default constructor, it initializes both the hue (texture index) and the number of neighbors to zero.


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