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 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 <a href="tqgridlayout.html">TQGridLayout</a> * grid = new <a href="tqgridlayout.html">TQGridLayout</a>( 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 ); <a name="x45"></a> ttb-><a href="tqwidget.html#setPalette">setPalette</a>( p ); - ttb-><a href="tqwidget.html#setEnabled">setEnabled</a>( FALSE ); + ttb-><a href="tqwidget.html#setEnabled">setEnabled</a>( false ); <a href="tqobject.html#connect">connect</a>( ttb, TQ_SIGNAL(<a href="tqbutton.html#clicked">clicked</a>()), TQ_SLOT(buttonClicked()) ); grid-><a href="tqgridlayout.html#addWidget">addWidget</a>( 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 <a name="f190"></a>TicTacGameBoard::computerStarts( bool v ) @@ -332,7 +332,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 ) @@ -341,7 +341,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); @@ -351,7 +351,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 @@ -360,7 +360,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 @@ -373,7 +373,7 @@ int <a name="f194"></a>TicTacGameBoard::checkBoard( TicTacArray *a ) i++; j--; } if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) // no winner |