#include #pragma argsused struct interfaccia { float mem[100]; int moveup,movedown,moveright,moveleft; float turnright,turnleft; int changecol; int shoot; }; extern "C" __declspec(dllexport) void __stdcall mind(interfaccia *bot); void __stdcall mind(interfaccia *bot) { if(!bot->mem[1] && (bot->mem[5]>100 || (bot->mem[5]<100 && bot->mem[3]==bot->mem[6]))) bot->turnright=0.3; if(bot->mem[5]<100 && bot->mem[3]!=bot->mem[6]) { if(bot->mem[2]>0) bot->turnright=bot->mem[2]; else bot->turnleft=-bot->mem[2]; bot->shoot=-1; } bot->moveup=3; }; int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved) { return 1; }