/* * This Software is the original work of Daniel TUNG * This Software is submitted in partial fulfillment of the * requirements for the degree of BCSE. * Dept. Computer Science, Monash University 2000 * * Copyright (c) 2000 beetung@cs.monash.edu.au * beetung@geocities.com */ #ifndef CAROP_H #define CAROP_H //// //// This class represent the entire command set implemented on //// our prototype //// //////////////////////////////////////// class CarOp { //////////////////////////////////////// public: /// /// prefix + 4 letters ( F --> Normal speed Forward ) /// ( FF -> Fast speed Forward ) enum { NO_COMMAND = -1, HALT = 0, BACK = 1, // backward FORW = 2, // forward FF_FORW = 3, // fast forward ( for my small brain loh ) F_FORW = 3, // fast forward (---SAME AS PREVIOUS---) RIGH = 4, B_RIGH = 5, // backward right F_RIGH = 6, // forward right FF_RIGH = 7, // fast forward righ LEFT = 8, // forward left B_LEFT = 9, // forward left F_LEFT = 10, // forward left FF_LEFT = 11, // fast forward left LAST_IN_LIST_NO_NEED_COMMA_WASTING_SPACE_AS_USUAL =-1 }; }; /// /// for translating "Integer commands" to readable "string name" /// static char *moveName[] = { "HALT", "BACK", "FORWARD", "FAST FORWARD", "RIGHT", "RIGHT Backward", "RIGHT FORDWARD", "RIGHT FAST FORWARD", "LEFT", "LEFT Backward", "LEFT FORWARD", "LEFT FAST FORWARD", "LAST_IN_LIST_AS_USUAL_WASTING_SPACE_NO_NEED_COMMA" }; #endif