testRobot - r1.LeftFace() r1.MoveForward(0) PrintLine(5,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Option Strict On Option Explicit On Module testRobot M Public Sub Main() Dim r1 As New CRobot(1, 2, "north") Dim r2, r3 As CRobot FileOpen(5, " out.dat", OpenMode.Output) 'add path PrintLine(5, r1.Location()) r1.LeftFace() r1.MoveForward(3) PrintLine(5, r1.Location()) r1.LeftFace() r1.LeftFace() r1.MoveBackward(5) PrintLine(5, r1.Location()) r1.MoveForward(14) PrintLine(5, r1.Location()) r1.RightFace()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r1.LeftFace() r1.MoveForward(0) PrintLine(5, r1.Location()) r2 = r1 PrintLine(5, r2.Location()) r3 = New CRobot(r1.xLoc - 1, r1.yLoc + 2, (r1.Orientation)) PrintLine(5, r3.Location()) 'tests Dim sMsg As String r3.MoveForward(-2) r3.MoveForward(-2) r3.MoveBackward(-3) r3.MoveForward(1.2) PrintLine(5, r3.Location()) FileClose(5) End Sub End Module...
View Full Document

Ask a homework question - tutors are online