PixelWars/purple/worker.c
2015-01-22 17:47:43 +01:00

43 lines
816 B
C

#include "job.h"
typedef struct{
char job;
t_coord pos;
char identity;
int last_dir;
int last_action;
int work_type; // worker
int amount_needed; // worker
t_coord storage; // worker
t_coord target_area; // worker and explorer
} purple_data_worker;
t_action p_jobless_ia(){
t_action action;
// goto (-1, -1)
// check NORTH
// empty -> be KING and go NORTH
// KING -> ask for identity
return action;
}
t_action p_explorer_ia(){
t_action action;
// goto nearest spot of the area
// start the loop
// at end of loop, go back to KING to get new AREA
return action;
}
t_action p_worker_ia(){
t_action action;
// loop :
// goto area
// search for requested resource
// bring it back to storage and amount--
// while(amount > 0)
// go see the master to get new goal
return action;
}