本文整理汇总了C++中Level::ReturnState方法的典型用法代码示例。如果您正苦于以下问题:C++ Level::ReturnState方法的具体用法?C++ Level::ReturnState怎么用?C++ Level::ReturnState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Level
的用法示例。
在下文中一共展示了Level::ReturnState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main ( int argc, char** argv )
{
fflush (stdout); // Enable console output, SDL disables this
vector<Character*> party;
vector<Character*> badguys;
vector<Point> start;
vector<Tile*> tiles;
Tile* tile = new Tile(Point(0,0), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(1,0), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(2,0), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(0,1), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(1,1), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(2,1), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(0,2), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(1,2), "GRASS");
tiles.push_back(tile);
tile = new Tile(Point(2,2), "GRASS");
tiles.push_back(tile);
start.push_back(Point(0,0));
Knight* knight = new Knight("dumb", 20, NULL, NULL);
party.push_back(knight);
Knight* knight2 = new Knight("dumb", 1, NULL, NULL);
knight2->Move(Point(3,3));
badguys.push_back(knight2);
Map* map = new Map(tiles);
Level bleh = Level(party, badguys, start, map);
cout << bleh.OnSelect(Point(0,1)) << endl;
cout << bleh.ReturnState() << endl;
Character* meh = bleh.OnSelect(Point(0,0));
cout << meh->GetAttr(Character::AGI) <<endl;
/*cout << bleh.ReturnState() << endl;
cout <<bleh.OnSelect(Point(0,1)) << endl;
cout <<bleh.OnSelect(Point(0,1)) << endl;
bleh.TakeTurn();
bleh.TakeTurn();
cout << bleh.OnSelect(Point(0,1)) << endl;
cout << bleh.OnSelect(Point(1,1)) << endl;
cout << bleh.ReturnState() << endl;
bleh.TakeTurn();
bleh.TakeTurn();
*/
cout << bleh.OnSelect(Point(3,2)) << endl;
cout << bleh.ReturnState() << endl;
cout << bleh.OnSelect(Point(3,3)) << endl;
cout << bleh.GetLoseCondition() << endl;
cout << bleh.GetWinCondition() << endl;
bleh.TakeTurn();
bleh.TakeTurn();
Character* chara = bleh.OnSelect(Point(3,2));
cout << chara->GetExp() << endl;
/*bleh.TakeTurn();
bleh.TakeTurn();
cout << bleh.OnSelect(Point(3,2)) << endl;
cout << bleh.OnSelect(Point(3,2)) << endl;
*/
/*
GameRoot ourGame;
ourGame.Initialize();
ourGame.GameLoop();
ourGame.Shutdown();
return 0;
*/
}