Tobis Programm forked to not destroy your golden files
Fork of Robocode by
source/StartUp.cpp
- Committer:
- aeschsim
- Date:
- 2017-05-03
- Revision:
- 97:8da1c57296ff
- Parent:
- 93:837a13760026
- Child:
- 114:720dc5df42a5
- Child:
- 115:c8ea0cd9b20c
File content as of revision 97:8da1c57296ff:
#include "StartUp.h" bool stb = false; bool stb2 = false; bool stb3 = false; int idle() { if(get_user() == false && stb) { return 15; // button pressed } else { stb = true; return 10; } } int idle2() { if(get_user() == false && stb2) { return 47; } else { stb2 = true; wait_ms(100); return 11; } } int initialisation() { Robot_init_all(); return 16; } int inital_arm_positioning() { open_grabber(); if(arm_position_release()) { return 17; } return 16; } int initial_turn() { if(stb3 == false) { stb3 = true; printf("initial turn...\r\n"); turn_for_deg(180); } else { printf("turning...\r\n"); if(1) { // check if turning complete printf("turn finished...\r\n"); return 35; } } return 28; }