RoboHunter


RoboHunter is a VB program that enables students to create robots.  The robots can then be added to an arena where they battle for "treasures".  The "program" consists of:

RoboGrid

RoboArena

Robots

ACTIVITIES

1. Create a program for testing roboGrid.

Dim rg As New RoboGrid(10, 200, 50, 10, 10, 1, 1)
rg.InitializeGrid(Me)
rg.DisplayGrid()

2. Create a simple robot (see notes above in Details about RoboGrid). Refer to this sample code.

3. Continue #2 by experimenting with RoboData and iGrid.

msgbox(roboData(1).x)

msgbox(iGrid(2,4))

4. Modify your robot from #3 to randomly choose its command to be either N, S, E, W, P, M, F.

5. If your robot runs into the wall it will lose its treasures.  Modify your robot from #4 to prevent it from hitting the walls.

 

n