#ifndef BOARD_H
#define BOARD_H

#include <array>
#include "color.h"
#include "move.h"

class Board
{
public:
   Board();

   void set(const Move&);

   void print() const;

   bool isFree(int col, int row) const;

   bool hasWin(Color) const;

   bool isRemis() const;

private:
   enum class FieldState { white, black, empty };

   static FieldState asFieldState(Color);

   std::array<std::array<FieldState, 3>, 3> mFields;
};

#endif
