diff options
Diffstat (limited to 'doc/html/tictac-example.html')
| -rw-r--r-- | doc/html/tictac-example.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html index 766da9bf3..87ad5136e 100644 --- a/doc/html/tictac-example.html +++ b/doc/html/tictac-example.html @@ -219,7 +219,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 <a href="qgridlayout.html">TQGridLayout</a> * grid = new <a href="qgridlayout.html">TQGridLayout</a>( this, nBoard, nBoard, 4 ); @@ -227,7 +227,7 @@ private: for ( int i=0; i<n; i++ ) { // create and connect buttons TicTacButton *ttb = new TicTacButton( this ); <a name="x45"></a> ttb-><a href="ntqwidget.html#setPalette">setPalette</a>( p ); - ttb-><a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE ); + ttb-><a href="ntqwidget.html#setEnabled">setEnabled</a>( false ); <a href="ntqobject.html#connect">connect</a>( ttb, TQ_SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), TQ_SLOT(buttonClicked()) ); grid-><a href="qgridlayout.html#addWidget">addWidget</a>( ttb, i%nBoard, i/nBoard ); buttons->insert( i, ttb ); @@ -247,7 +247,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 <a name="f190"></a>TicTacGameBoard::computerStarts( bool v ) @@ -333,7 +333,7 @@ int <a name="f194"></a>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 ) @@ -342,7 +342,7 @@ int <a name="f194"></a>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); @@ -352,7 +352,7 @@ int <a name="f194"></a>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 @@ -361,7 +361,7 @@ int <a name="f194"></a>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 @@ -374,7 +374,7 @@ int <a name="f194"></a>TicTacGameBoard::checkBoard( TicTacArray *a ) i++; j--; } if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) // no winner |
