You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
' Lesson 3: getting set upGraphicsWindow.BrushColor="Red"GraphicsWindow.PenColor="White"paddle=Shapes.AddRectangle(120,12)Shapes.Move(paddle,0,GraphicsWindow.Height-12)GraphicsWindow.BrushColor=GraphicsWindow.GetRandomColor()ball=Shapes.AddEllipse(16,16)GraphicsWindow.BackgroundColor=GraphicsWindow.GetRandomColor()' Lesson 4: let's get movingGraphicsWindow.MouseMove=WhenMouseMovesSubWhenMouseMovesmouseX=GraphicsWindow.MouseXShapes.Move(paddle,mouseX-60,GraphicsWindow.Height-12)EndSub' Lesson 5&6: making the ball movemoveX=1moveY=1stillPlaying="True"WhilestillPlaying="True"x=x+moveXy=y+moveYShapes.Move(ball,x,y)Program.Delay(5)'Make this number bigger to make the ball move slowerIf(y>GraphicsWindow.Height)ThenGraphicsWindow.ShowMessage("You Lose","Paddle")stillPlaying="False"EndIf' Lesson 6: make it bouncepaddleX=Shapes.GetLeft(paddle)If(y>=GraphicsWindow.Height-26andx>=paddleXandx<=paddleX+120)ThenmoveY=-moveYEndIfIf(y<0)ThenmoveY=-moveYEndIfIf(x>=GraphicsWindow.Width-16orx<0)ThenmoveX=-moveXEndIfEndWhile
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: