Clemson ECE 453
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Rover group's stub code

Go down

Rover group's stub code Empty Rover group's stub code

Post  hoffma3 Mon Feb 02, 2009 7:55 pm

After the group leader meeting Michael attended the other day apparently it was decided that every group's code will be compiled and executed together. So, our getcommand function is now obsolete and as such the only stub code actually required for us is a function to call our rover wrapper functions. Such is attached below.

Code:
//File: stub.cpp
//Purpose: Provides stub code demonstrating the usage
//         of rover commands.
//Author: Michael King, Brittney Harris, Allan Hoffman, Dustin Evans
//Last modified: 2/01/09

#include "Rover.h"
#include <windows.h>

void main() {
   Rover rover;
   
   //Testing series of movement commands with
   //2 second sleeps inbetween.
   rover.moveForward();
   Sleep(2000);
   rover.moveBackward();
   Sleep(2000);
   rover.turnRight();
   Sleep(2000);
   rover.turnLeft();
   Sleep(2000);

   //Testing movement commands while rover is "killed"
   rover.killActions();
   Sleep(2000);
   rover.moveForward();
   Sleep(2000);
   rover.moveBackward();
   Sleep(2000);

   //"unkilling" rover and testing commands.
   rover.unkillActions();
   Sleep(2000);
   rover.moveForward();
   Sleep(2000);
   rover.moveBackward();
}
hoffma3
hoffma3

Posts : 6
Join date : 2009-01-08

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum