Исправлен перехват барабана, обнаружение отключенных зон, мелкий рефакторинг

This commit is contained in:
2023-02-05 14:07:32 +03:00
parent 4a029d9aa5
commit d9eb8a2368
4 changed files with 104 additions and 75 deletions

15
utils.h
View File

@@ -375,13 +375,28 @@ extern const short NIGHT_ZONES[9];
char zone_is_busy(short zone);
#define ROBOT_1 1
#define ROBOT_2 2
#define ROBOT_NONE -1
short can_move(struct barrel *bar, char robot_id);
short get_operation_priority(short barrel_id);
char remove_barrel_from_zone(short zone);
void create_operation(struct robot_code *code, const short barrel_id, const short start_zone, const short dest_zone,
const short current_zone, const short robot_id);
/**
* Активна ли зона цинкования или травления
* @param zone ROBOT_ZONE_ETCH или ROBOT_ZONE_GAL. Для других значений функция вернет false.
* @return true, если выбранная зона цинкования или травления доступна
*/
char is_accessible_zone(short zone);
/**
* Инкрементировать зону цинкования или зону травления.
* @param zone ROBOT_ZONE_ETCH или ROBOT_ZONE_GAL. Для других значений функция вернет false.