build: bug fixes for release version
* fixed search activating 2 nodes, because of NodeType in query * fixed search results didn't contain results with same name * added protected contents to sample and tictactoe code * fixed CxxParserTests not logging errors, disabled logging for tests with errors * fixed CxxParserTests not finding system headers, added TestSettings.xml and pass headers to Parser::parseFile()
This commit is contained in:
@@ -3,7 +3,10 @@ public:
|
||||
void Do() {}
|
||||
};
|
||||
|
||||
class Base {};
|
||||
class Base {
|
||||
protected:
|
||||
void Init() {}
|
||||
};
|
||||
|
||||
class Game : public Base {
|
||||
public:
|
||||
@@ -11,12 +14,11 @@ public:
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init() {}
|
||||
|
||||
void Run() {
|
||||
player.Do();
|
||||
}
|
||||
|
||||
private:
|
||||
Player player;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,17 @@ public:
|
||||
|
||||
virtual Field::Move Turn( const Field& field ) const = 0;
|
||||
|
||||
const Field::Token& getToken() const
|
||||
{
|
||||
return token_;
|
||||
}
|
||||
|
||||
const std::string getName() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
protected:
|
||||
const Field::Token token_;
|
||||
const std::string name_;
|
||||
};
|
||||
|
||||
@@ -44,11 +44,11 @@ public:
|
||||
for ( int i = 0; i < 9; i++ ) {
|
||||
Player& player = *players_[playerIndex];
|
||||
|
||||
field_.MakeMove( player.Turn( field_ ), player.token_ );
|
||||
field_.MakeMove( player.Turn( field_ ), player.getToken() );
|
||||
field_.Show();
|
||||
|
||||
if ( field_.SameInRow( player.token_, 3 ) ) {
|
||||
std::cout << player.name_ << " won!\n\n";
|
||||
if ( field_.SameInRow( player.getToken(), 3 ) ) {
|
||||
std::cout << player.getName() << " won!\n\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user