PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

source/main.cpp

Committer:
cittecla
Date:
2017-03-14
Revision:
31:51f52ffa4b51
Parent:
29:e7d0208bf2af
Child:
32:777976c4d733

File content as of revision 31:51f52ffa4b51:

//#include "mbed.h"
#include <stdio.h>



int state = 0;

int main() {
    
    init();

    while (timer() < 300) // 5min
    {
        /*********************************************************************************
        Non_state machine driven function
        This functions will be called every cycle, use for safety and sensor functipons
        **********************************************************************************/
/*      safty() {

        }

        scanning() {
        
        }
*/

    /*********************************************************************************
    state machine driven function
    This functions will only be called when there state is active.
    The state machine will be in the same state until this action is completed or
    a safty function kicks in and stops the current function.
    Every function will return the next active state upon its transition table.
    State and Transition Table will always be noted on the top of every state sheet
    **********************************************************************************/
        switch (state)
        {
        case 0:
            //positioning

            break;
        case 20:
            //mapping

            break;
        case 40:
            //a-star

            break;
        case 60:
            //moving

            break;
        case 80:
            //grabing

            break;
        case 100:
            //something

            break;

        case 120:
            //something

            break;
        default:

            printf("Fatal Error, Unkonwn state!");
            break;
        }





    }

    end_all();
}

int timer() {

}

void init() {

}
void end_all() {
}