summaryrefslogtreecommitdiffstats
path: root/doc/html/tutorial1-13.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/tutorial1-13.html')
-rw-r--r--doc/html/tutorial1-13.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/html/tutorial1-13.html b/doc/html/tutorial1-13.html
index 4e92f4642..4f69d23f3 100644
--- a/doc/html/tutorial1-13.html
+++ b/doc/html/tutorial1-13.html
@@ -106,7 +106,7 @@ not.
<p> <pre> bool gameOver() const { return gameEnded; }
</pre>
-<p> This function returns TRUE if the game is over or FALSE if a game
+<p> This function returns true if the game is over or false if a game
is going on.
<p> <pre> void setGameOver();
void restartGame();
@@ -119,13 +119,13 @@ shoot() slot makes sense. We'll use it below to enable/disable the
Shoot button.
<p> <pre> bool gameEnded;
</pre>
-<p> This private variable contains the game state. TRUE means that the
-game is over, and FALSE means that a game is going on.
+<p> This private variable contains the game state. true means that the
+game is over, and false means that a game is going on.
<p> <h3> <a href="t13-cannon-cpp.html">t13/cannon.cpp</a>
</h3>
<a name="1-4"></a><p>
-<p> <pre> gameEnded = FALSE;
+<p> <pre> gameEnded = false;
</pre>
<p> This line has been added to the constructor. Initially, the game is not
over (luckily for the player :-).
@@ -137,7 +137,7 @@ over (luckily for the player :-).
shoot_ang = ang;
shoot_f = f;
<a name="x2407"></a> autoShootTimer-&gt;<a href="ntqtimer.html#start">start</a>( 50 );
- emit canShoot( FALSE );
+ emit canShoot( false );
}
</pre>
<p> We added a new isShooting() function, so shoot() uses it instead of
@@ -149,7 +149,7 @@ cannot shoot now.
return;
if ( isShooting() )
autoShootTimer-&gt;<a href="ntqtimer.html#stop">stop</a>();
- gameEnded = TRUE;
+ gameEnded = true;
<a href="ntqwidget.html#repaint">repaint</a>();
}
</pre>
@@ -166,14 +166,14 @@ widget.
{
if ( isShooting() )
<a name="x2408"></a> autoShootTimer-&gt;<a href="ntqtimer.html#stop">stop</a>();
- gameEnded = FALSE;
+ gameEnded = false;
<a href="ntqwidget.html#repaint">repaint</a>();
- emit canShoot( TRUE );
+ emit canShoot( true );
}
</pre>
<p> This slot starts a new game. If a shot is in the air, we stop shooting.
We then reset the <tt>gameEnded</tt> variable and repaint the widget.
-<p> moveShot() too emits the new canShoot(TRUE) signal at the same time as
+<p> moveShot() too emits the new canShoot(true) signal at the same time as
either hit() or miss().
<p> Modifications in CannonField::paintEvent():
<p> <pre> void CannonField::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e )
@@ -188,7 +188,7 @@ either hit() or miss().
}
</pre>
<p> The paint event has been enhanced to display the text "Game Over" if
-the game is over, i.e., <tt>gameEnded</tt> is TRUE. We don't bother to
+the game is over, i.e., <tt>gameEnded</tt> is true. We don't bother to
check the update rectangle here because speed is not critical when
the game is over.
<p> To draw the text we first set a black pen; the pen color is used