Filter löschen
Filter löschen

Another Psuedocode Implementation Question?

1 Ansicht (letzte 30 Tage)
Matt Amador
Matt Amador am 2 Nov. 2017
Kommentiert: Walter Roberson am 2 Nov. 2017
Hello there. I have another psuedocode problem. The following photo shows the section of the psuedocode that has me stumbled. The thing is that when I try to execute this part of the entire psuedocode, it says that the gameOn function is undefined. Why is this? Can anyone help out?
Here's my attempted psuedocode implementation:
while gameOn == true
if turn < 0
[r,c] = getmove(G,-1);

Antworten (1)

Walter Roberson
Walter Roberson am 2 Nov. 2017
You failed to do steps 4 and 6 and 7. gameOn is defined in step 6.
  4 Kommentare
Matt Amador
Matt Amador am 2 Nov. 2017
So then should I just leave the while as:
while gameOn
Walter Roberson
Walter Roberson am 2 Nov. 2017
As long as you make sure you initialize gameOn (upper-case O) instead of gameon (lower-case O) either one is fine.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by