123456789101112131415161718192021222324252627282930313233 |
- #ifndef FIELDS_H
- #define FIELDS_H
- #include "Vector.h"
- #include "String.h"
- class Fields final {
- public:
- enum State {
- BLACK, WHITE, EMPTY
- };
- bool hasState(const Vector& v, State state) const;
- State getState(const Vector& v) const;
- void setState(const Vector& v, State state);
- void print(const Vector& active);
- void read();
- private:
- char getChar(int x, int y, const Vector& active) const;
- void toString(String& s, const Vector& active) const;
- void lineToString(String& s, int y, const Vector& active) const;
- void consumeLine() const;
- void readLine(uint y);
- State fields[9][5];
- };
- #endif
|