98 lines
2.1 KiB
C++
98 lines
2.1 KiB
C++
#pragma once
|
|
#include <timer.h>
|
|
|
|
#include "context.h"
|
|
#include "state.h"
|
|
#include "states.h"
|
|
#include "station.h"
|
|
|
|
class Startup final : public State
|
|
{
|
|
public:
|
|
Startup();
|
|
State* putDown(Context context, Station* newStation) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
|
|
class WaitingForGameStart final : public State
|
|
{
|
|
public:
|
|
WaitingForGameStart();
|
|
State* pickedUp(Context context) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
class OnTheMove final : public State
|
|
{
|
|
private:
|
|
Station* targetStation;
|
|
|
|
public:
|
|
explicit OnTheMove(Station* targetStation);
|
|
State* putDown(Context context, Station* newStation) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
class IncorrectStation final : public State
|
|
{
|
|
private:
|
|
Station* targetStation;
|
|
|
|
public:
|
|
explicit IncorrectStation(Station* targetStation);
|
|
State* pickedUp(Context context) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
|
|
class Hacking final : public State
|
|
{
|
|
private:
|
|
Timer timer;
|
|
Station* currentStation;
|
|
|
|
public:
|
|
explicit Hacking(Station* currentStation);
|
|
State* pickedUp(Context context) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
class Complain final : public State
|
|
{
|
|
private:
|
|
Station* currentStation;
|
|
|
|
public:
|
|
explicit Complain(Station* currentStation);
|
|
State* putDown(Context context, Station* newStation) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
class WaitingForPickup final : public State
|
|
{
|
|
private:
|
|
Station* currentStation;
|
|
Station* targetStation;
|
|
|
|
public:
|
|
WaitingForPickup(Station* currentStation, Station* targetStation);
|
|
State* pickedUp(Context context) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|
|
|
|
class End final : public State
|
|
{
|
|
public:
|
|
End();
|
|
State* pickedUp(Context context) override;
|
|
State* update(Context context) override;
|
|
String updateDisplay() override;
|
|
};
|