buenzliai/main/state.h

19 lines
406 B
C
Raw Normal View History

2024-05-16 13:19:30 +00:00
#pragma once
2024-05-17 13:04:36 +00:00
#include <Arduino.h>
2024-05-17 13:37:03 +00:00
#include <LiquidCrystal.h>
2024-05-17 13:04:36 +00:00
#include "station.h"
2024-05-17 13:37:03 +00:00
#include "context.h"
2024-05-16 13:19:30 +00:00
2024-05-17 13:04:36 +00:00
class Station;
2024-05-16 13:19:30 +00:00
2024-05-17 13:04:36 +00:00
class State {
2024-05-16 13:19:30 +00:00
public:
2024-05-17 13:04:36 +00:00
virtual ~State() = default;
virtual State* pickedUp() { return this; }
virtual State* putDown(Station* newStation) { return this; }
2024-05-17 13:37:03 +00:00
virtual State* update(Context context) { return this; }
2024-05-16 13:19:30 +00:00
2024-05-17 13:04:36 +00:00
virtual void updateDisplay(LiquidCrystal* lcd) { }
};