Used ClangFormat style guide I'm happy with.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,31 +5,26 @@
|
||||
#include <vector>
|
||||
#include "../TurnChoices/BaseTurnChoice.hpp"
|
||||
|
||||
namespace CreatureLib::Battling{
|
||||
namespace CreatureLib::Battling {
|
||||
class ChoiceQueue {
|
||||
std::vector<BaseTurnChoice*> _queue;
|
||||
size_t _current = 0;
|
||||
|
||||
public:
|
||||
bool HasCompletedQueue = false;
|
||||
|
||||
explicit ChoiceQueue(std::vector<BaseTurnChoice*> queue)
|
||||
:_queue(std::move(queue)){}
|
||||
explicit ChoiceQueue(std::vector<BaseTurnChoice*> queue) : _queue(std::move(queue)) {}
|
||||
|
||||
BaseTurnChoice* Dequeue(){
|
||||
BaseTurnChoice* Dequeue() {
|
||||
auto b = _queue[_current];
|
||||
_current++;
|
||||
return b;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool HasNext() const{
|
||||
return _current < _queue.size();
|
||||
}
|
||||
[[nodiscard]] bool HasNext() const { return _current < _queue.size(); }
|
||||
|
||||
std::vector<BaseTurnChoice*>& GetInnerQueue(){
|
||||
return _queue;
|
||||
}
|
||||
std::vector<BaseTurnChoice*>& GetInnerQueue() { return _queue; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //CREATURELIB_CHOICEQUEUE_HPP
|
||||
#endif // CREATURELIB_CHOICEQUEUE_HPP
|
||||
|
||||
Reference in New Issue
Block a user