## Re: [stella] QBASIC

 Subject: Re: [stella] QBASIC From: Chris Wilkson Date: Mon, 22 Oct 2001 00:50:02 -0400 (EDT)
```This is pretty easy.  You can use a similar approach to incrementing the
number of steps (suggested by others):

W = W + 1 ; increment W by 1

If you don't know what this means, it may be easier to explain in terms
of a temporary variable:

TEMP = W + 1
W = TEMP

These 2 code segments have the same effect, but the first is much shorter,
and uses fewer variables.  It is always used.

Oh.  And just in case you haven't heard the term "psuedo-code" before,
it means a mix of actual code and a natural language, in this case English.
It isn't supposed to work as written...it's just an outline to show the
basic idea of how an algorithm should work.

Here's an example of pseudo-code for what you want to do.  But note that this
is pretty complete pseudo code.

REM I'm borrowing from/augmenting Roger's pseudo-code
REM want to keep # of steps, # of warps, and score as separate variables
REM 'player_took_a_step' and 'player_touched_a_warp' are variables

IF{player_took_a_step} THEN
R = R + 1 ; REM 'R' is the # of steps...add 1 to the current value
IF{player_touched_a_warp} THEN
W = W + 1 ; REM 'W' is the # of warps...add 1 to the current value
END IF
END IF

E = R + (15 * W) ; REM 'E' is the score...compute the new value

Sorry if my explanation is too basic...I don't know your programming
experience.  :)

-Chris

On Sun, 21 Oct 2001 braves4515@xxxxxxx wrote:

> Maybe an easier question is how do i get the program to get WARPS to change
> from 0 to 1 then 1 to 2 etc...
>
> maybe if i can get it to do that i can work off that
>

-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

```