@ Override public void run ( ) { try { try { turnsControl . waitTurns ( 1 , "Robot starting" ) ; // block at the beginning so that all // robots start at the // same time } catch ( BankInterruptedException exc ) { log . trace ( "[run] Interrupted before starting" ) ; } assert getData ( ) . isEnabled ( ) : "Robot is disabled" ; mainLoop ( ) ; log . debug ( "[run] Robot terminated gracefully" ) ; } catch ( Exception | Error all ) { log . error ( "[run] Problem running robot " + this , all ) ; die ( "Execution Error -- " + all ) ; } }
The main loop of the robot