Cluedo Solver v1.0
Cluedo game solver making deductions.
Loading...
Searching...
No Matches
Cluedo::CardUtils::CardIterator Struct Reference

An iterator for cards. More...

#include <Card.hpp>

Public Member Functions

constexpr CardIterator (std::uint8_t i)
 
constexpr Card operator* () const
 
constexpr bool operator!= (CardIterator const &other) const
 
constexpr void operator++ ()
 Advances the iterator to the next card.
 

Public Attributes

std::uint8_t index
 The index of the card.
 

Detailed Description

An iterator for cards.

Constructor & Destructor Documentation

◆ CardIterator()

Cluedo::CardUtils::CardIterator::CardIterator ( std::uint8_t i)
inlineconstexpr

Constructs an iterator that points to the card with the given index.

Parameters
iThe index of the card.

Member Function Documentation

◆ operator!=()

bool Cluedo::CardUtils::CardIterator::operator!= ( CardIterator const & other) const
inlineconstexpr

Compares two iterators.

Parameters
otherThe other iterator.
Returns
true if the iterators don't point to the same card, false otherwise.

◆ operator*()

Card Cluedo::CardUtils::CardIterator::operator* ( ) const
inlineconstexpr

Returns the card that the iterator points to.

Returns
The card that the iterator points to.

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