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

Holds a vector of bubble events and the type of event that occurred. More...

#include <board.hpp>

Classes

struct  BubbleEvent
 Wraps the row and column of a bubble on the board with its hue. More...
 

Public Types

enum class  EventType { ATTACH , POP , DROP }
 Determines the type of event that occurred with the bubble.
 

Public Member Functions

 BubbleEventVector (const std::vector< BubbleEvent > &events, const EventType type)
 Constructs a BubbleEventVector instance with the given events and type. More...
 
 BubbleEventVector (std::vector< BubbleEvent > &&events, const EventType type)
 

Public Attributes

std::vector< BubbleEventevents
 
const EventType type
 

Detailed Description

Holds a vector of bubble events and the type of event that occurred.

This struct wraps a vector of bubble events (just row, column and hue) with an event type, such as popping or dropping. Essentially this struct allows building a list of events that occurred on the board, which can be used to later obtain information about events that have taken place.

The list interface used by the board can return a vector of events (bubbles) related by belonging to the same event type.

See also
hasEvents(), popEvent()

Constructor & Destructor Documentation

◆ BubbleEventVector()

GameBoard::BubbleEventVector::BubbleEventVector ( const std::vector< BubbleEvent > &  events,
const EventType  type 
)
inline

Constructs a BubbleEventVector instance with the given events and type.

Parameters
eventsThe events that occurred with the bubbles.
typeThe type of event that occurred with the bubbles.

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