Blackjack Decision Maker
ToggleLED.h
Go to the documentation of this file.
1 /*
2 Copyright 2023 Georgios Titas
3 Copyright 2023 Alexander Douglas
4 Copyright 2023 Jijo Varghese
5 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 */
9 
10 #ifndef LEDS_H
11 #define LEDS_H
12 #include "Card.h"
13 #include "CallbackLinker.h"
14 
19 class ToggleLED : public CallbackLinker
20 {
21 public:
22  ToggleLED();
23  ~ToggleLED();
24  void flashled(decisions choice);
25  void nextCallback(AcePlaysUtils &callbackData);
26 private:
27  void gpio(int led);
28 };
29 #endif //LEDS_H
decisions
A Blackjack enum decisions to determine the next Optimal Play.
Definition: Card.h:35
Generic abstract Callback Interface class.
Definition: CallbackLinker.h:20
Class to control the Rasp Pi pins and toggle LEDs ON/OFF.
Definition: ToggleLED.h:20
ToggleLED()
Construct a new ToggleLED::ToggleLED object.
Definition: ToggleLED.cpp:23
void flashled(decisions choice)
Method to flash an LED.
Definition: ToggleLED.cpp:44
void nextCallback(AcePlaysUtils &callbackData)
Implement the nextCallback virtual method to pass information down the pipeline.
Definition: ToggleLED.cpp:108
~ToggleLED()
Destroy the ToggleLED::ToggleLED object.
Definition: ToggleLED.cpp:98
Utility structure used by the AcePlays repo for passing necessary information down the processing pip...
Definition: Card.h:80