What the C program does
Print “I started at X=$1 Y = $2”, $1=xPos, $2=yPos
For i=0 To i=100
Select Random x in {-1,0,1}
Select Random y in {-1,0,1}
xPos =xPos +x
If xPos >worldSizeX Then xPos =0
yPos =yPos +y
If yPos > worldSizeY Then yPos =0
Print “I moved to X=$1 Y=$2”, $1=xPos, $2=yPos
End For
Previous slide
Next slide
Back to first slide
View graphic version