test: History ui tests

This commit is contained in:
Eberhard Graether
2018-09-07 12:50:04 +02:00
parent ac7b642d8a
commit 92a19869e7
19 changed files with 879 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
#ifndef _FIELD_
#define _FIELD_
#include "game_object.h"
class Field : public GameObject {
public:
enum Token {
None = 0,
PlayerA = 1,
PlayerB = 4
};
static Token Opponent( Token token );
struct Move {
int row;
int col;
};
Field();
~Field();
Field Clone() const;
void Clear();
void Show() const;
int SameInRow( Token token, int amount ) const;
bool InRange( const Move& move ) const;
bool IsEmpty( const Move& move ) const;
bool IsFull() const;
void MakeMove( const Move& move, Token token );
void ClearMove( const Move& move );
private:
Token** grid_;
int left_;
};
#endif // _FIELD_