Raylib Bubbles
C++11 Raylib bubble shooter game.
|
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 |
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.
==
, !=
, and =
, which allow short-hand comparisons and assignments with the hue
property.
|
inline |
Default constructor for the BubbleCell struct.
hue | The hue of the bubble. Zero (default) is used to represent an empty cell. |
neighbors | The 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.