5 * Created by Daniel Axtens on 19/04/10.
6 * Licensed under an MIT-style license: see the LICENSE file for details.
10 /********** Type definitions **********/
12 /* The type of item used in an attack or defence */
13 typedef enum {rock, paper, scissors} ITEMTYPE;
16 /* An attack, consisting of the real attack and the attack promised */
19 ITEMTYPE promisedAttack;
22 /********** Utility Function definitions **********/
24 /* Returns a random item */
26 ITEMTYPE RandomAttack();
28 /********** Bot Function definitions **********/
30 /* Defend( foeName : string - the name of your foe;
31 foePromisedAttack : ITEMTYPE - the item your foe promised to use
32 ) : ITEMTYPE - the item you wish to use to defend;
34 Called when your agent needs to defend itself.
37 ITEMTYPE Defend( char * foeName, ITEMTYPE foePromisedAttack );
40 /* Attack( foeName : string - the name of your foe
41 ) : ATTACKTYPE - the real and promised attack you wish to use
43 Called when your agent needs to attack another agent.
46 ATTACKTYPE Attack( char * foeName );
49 /* Results( foeName : string - the name of your foe;
50 isInstigatedByYou : 0=you defended/1=you attacked;
51 yourItem : ITEMTYPE - the item you used;
52 theirItem : ITEMTYPE - the item they used;
53 promisedItem : ITEMTYPE - the item that was promised
56 Called after your agent battles another agent, to tell you how the battle goes.
59 void Results( char * foeName, int isInstigatedByYou, ITEMTYPE yourItem,
60 ITEMTYPE theirItem, ITEMTYPE promisedItem);