1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
int main()
{
SetConsoleTitle(TEXT("\"Nonogram\""));
string line(58,'\xC4');
int nonogame[21][21] = {{0},{0}}; // 0 to 19 for puzzle, #20 for amount of filled grid cells in row or column
int rows, columns;
int over, down;
char again = 'N';
Console::SetWindowSize(width+1, height+1);
Grid(1,0,0,width-1,height-1,1,1,black, light_gray,0,0,0);
gotoXY(34,0,"\xB6 Nonogram \xC7");
do
{
rows = 3, columns = 3;
Set_Grid_Size(rows, columns);
over = (width-(columns*2))/2;
down = (height-(rows*2))/2;
Grid(0,1,1,width-3,height-3,1,1,black, light_gray,0,0,0);
Grid(3,over,down,1,1,columns,rows,black, light_cyan,1,dark_gray,dark_gray);
Grid(3,12,47,56,1,1,1,black, light_cyan,1,dark_gray,dark_gray);
text(black on dark_gray);
gotoXY(13,50, line);
Set_Grid_Fill(over, down, rows, columns, nonogame);
Fill_Grid(over, down, rows, columns, nonogame);
again = Play_Again();
gotoXY(2, 6, "?? Again = "); // Never prints
cout << again; // This is to check what is returned
}while(again == 'Y');
setcursor(1, 10);
text(black on light_gray);
WaitKey();
}
|