From 4d495175043c399fdca6e1bb4c74ef176fc76fb4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 6 Aug 2025 11:29:57 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Signed-off-by: Michele Calgaro --- doc/html/tictac-example.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/html/tictac-example.html') diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html index a9945bffd..6851eb1fd 100644 --- a/doc/html/tictac-example.html +++ b/doc/html/tictac-example.html @@ -218,7 +218,7 @@ private: st = Init; // initial state nBoard = n; n *= n; // make square - comp_starts = FALSE; // human starts + comp_starts = false; // human starts buttons = new TicTacButtons(n); // create real buttons btArray = new TicTacArray(n); // create button model TQGridLayout * grid = new TQGridLayout( this, nBoard, nBoard, 4 ); @@ -226,7 +226,7 @@ private: for ( int i=0; i<n; i++ ) { // create and connect buttons TicTacButton *ttb = new TicTacButton( this ); ttb->setPalette( p ); - ttb->setEnabled( FALSE ); + ttb->setEnabled( false ); connect( ttb, TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) ); grid->addWidget( ttb, i%nBoard, i/nBoard ); buttons->insert( i, ttb ); @@ -246,7 +246,7 @@ TicTacGameBoard::~TicTacGameBoard() // -------------------------------------------------------------------------- // TicTacGameBoard::computerStarts( bool v ) // -// Computer starts if v=TRUE. The human starts by default. +// Computer starts if v=true. The human starts by default. // void TicTacGameBoard::computerStarts( bool v ) @@ -332,7 +332,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) { int t = 0; int row, col; - bool won = FALSE; + bool won = false; for ( row=0; row<nBoard && !won; row++ ) { // check horizontal t = a->at(row*nBoard); if ( t == TicTacButton::Blank ) @@ -341,7 +341,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( col<nBoard && a->at(row*nBoard+col) == t ) col++; if ( col == nBoard ) - won = TRUE; + won = true; } for ( col=0; col<nBoard && !won; col++ ) { // check vertical t = a->at(col); @@ -351,7 +351,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( row<nBoard && a->at(row*nBoard+col) == t ) row++; if ( row == nBoard ) - won = TRUE; + won = true; } if ( !won ) { // check diagonal top left t = a->at(0); // to bottom right @@ -360,7 +360,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( i<nBoard && a->at(i*nBoard+i) == t ) i++; if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) { // check diagonal bottom left @@ -373,7 +373,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) i++; j--; } if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) // no winner -- cgit v1.2.3