X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Flink%2FC%2Fagents%2Fc_lucifer.c;fp=src%2Flink%2FC%2Fagents%2Fc_lucifer.c;h=0000000000000000000000000000000000000000;hb=041f195b018bb74676017dd0a09f8a079611ba4b;hp=f497366a967e0c1a6f7d1f23d159f1c062a8f258;hpb=699697dcaa730ccc26cd570cbf8975e2591344c0;p=progcomp10.git diff --git a/src/link/C/agents/c_lucifer.c b/src/link/C/agents/c_lucifer.c deleted file mode 100644 index f497366..0000000 --- a/src/link/C/agents/c_lucifer.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * c_lucifer.c - * c-link-lib - * - * Created by Daniel Axtens on 20/04/10. - * Licensed under an MIT-style license: see the LICENSE file for details. - * - */ - - -#include - -/* Implement the lucifer bot, which always lies expecting people to be good - and always goes for the kill */ - -ATTACKTYPE Attack( char * foe_name ) { - ATTACKTYPE attack; - - attack.realAttack = RandomAttack(); - - /* Here we choose the thing that will hurt them if they go for a tie */ - switch (attack.realAttack) { - case rock: - attack.promisedAttack = scissors; - break; - case paper: - attack.promisedAttack = rock; - break; - default: /* attack = scissors */ - attack.promisedAttack = paper; - break; - } - - return attack; -} - -/* Here we trust that they are telling the truth. And we try to kill them. */ -ITEMTYPE Defend( char * foeName, ITEMTYPE foePromisedAttack ) { - ITEMTYPE defence; - switch (foePromisedAttack) { - case rock: - defence = paper; - break; - case paper: - defence = scissors; - break; - default: - defence = rock; - break; - } - return defence; -} - -/* You need to define a results function, even if it isn't used - (otherwise the linker will complain) */ -void Results( char * foeName, int isInstigatedByYou, RESULTTYPE winner, - ITEMTYPE attItem, ITEMTYPE defItem, ITEMTYPE bluffItem, - int pointDelta ) { - - return; /* Ignore whatever just happened. */ -} - -/* same for Cleanup() */ - -void Cleanup() { - return; -} \ No newline at end of file