本文整理汇总了C++中screen::printString方法的典型用法代码示例。如果您正苦于以下问题:C++ screen::printString方法的具体用法?C++ screen::printString怎么用?C++ screen::printString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类screen
的用法示例。
在下文中一共展示了screen::printString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
bool bCont = true;
char strCont = 'y';
while (bCont)
{
objScreen.clearScreen();
objScreen.moveCursor(0, 0);
cout.flush();
buildArray();
printArray();
if (aBoard[0][0][0].value == ' ')
{
objScreen.printChar('-', aBoard[0][0][0].x, aBoard[0][0][0].y, 32, 0, 0, 25000);
}
if (mazeMe(0, 0, 0))
{
objScreen.printString("Puzzled Solved!", 1, 22, 25000);
}
else
{
objScreen.printString("Puzzle Unsolvable.", 1, 22, 25000);
}
objScreen.moveCursor(0, 23);
cout.flush();
objScreen.printString("Do you want to play another game (y/n)? ", 1, 23, 25000);
cin >> strCont;
if (strCont == 'n')
{
bCont = false;
}
cin.ignore(1000, '\n');
}
return 0;
}
示例2: buildArray
void buildArray()
{
ifstream is;
char file[256];
objScreen.printString("Please input file name: ", 1, 1, 25000);
cin.get(file, 256);
is.open(file);
int x[5] = {20, 32, 44, 56, 68};
int y[5] = {5, 6, 7, 8, 9};
for (int plane = 0; plane <= 4; plane++)
{
for (int row = 0; row <= 9; row++)
{
for (int column = 0; column <= 10; column++)
{
aBoard[row][column][plane].value = is.get();
aBoard[row][column][plane].x = x[plane] + column;
aBoard[row][column][plane].y = y[plane] + row;
}
x[plane]--;
}
}
is.close();
int nIndex = 0;
for (int i = -1; i <= 1; i++)
{
for (int j = -1; j <= 1; j++)
{
for (int k = -1; k <= 1; k++)
{
aMoves[nIndex].row = i;
aMoves[nIndex].column = j;
aMoves[nIndex].plane = k;
nIndex++;
}
}
}
}