applied TPG's patch, fixed wash
[progcomp10.git] / src / link / C / agents / c_angel.c
old mode 100644 (file)
new mode 100755 (executable)
index 62e2147..d11b551
@@ -1,41 +1,45 @@
-/*
- *  c_angel.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 <c_link.h>
-
-/* Implement the angel bot, which always tells the truth
-   and expects others to do the same */
-
-ATTACKTYPE Attack( char * foe_name ) {
-       ATTACKTYPE attack;
-       
-       attack.realAttack =  RandomAttack();            /* Chooses randomly from Rock, Paper, Scissors */ 
-       attack.promisedAttack = attack.realAttack;      /* Tells the truth for its bluff */
-
-       return attack;
-}
-
-ITEMTYPE Defend( char * foeName, ITEMTYPE foePromisedAttack ) {
-       return foePromisedAttack;       /* Trusts them to be going for a tie */
-}
-
-/* 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
+/*\r
+ *  c_angel.c\r
+ *  c-link-lib\r
+ *\r
+ *  Created by Daniel Axtens on 20/04/10.\r
+ *  Licensed under an MIT-style license: see the LICENSE file for details.\r
+ *\r
+ */\r
+\r
+#include <c_link.h>\r
+\r
+void * Initialise( char * me ) {\r
+       return NULL;\r
+}\r
+\r
+/* Implement the angel bot, which always tells the truth\r
+   and expects others to do the same */\r
+\r
+ATTACKTYPE Attack( void * this, char * foe_name ) {\r
+       ATTACKTYPE attack;\r
+       \r
+       attack.realAttack =  RandomAttack();            /* Chooses randomly from Rock, Paper, Scissors */ \r
+       attack.promisedAttack = attack.realAttack;      /* Tells the truth for its bluff */\r
+\r
+       return attack;\r
+}\r
+\r
+ITEMTYPE Defend( void * this, char * foeName, ITEMTYPE foePromisedAttack ) {\r
+       return foePromisedAttack;       /* Trusts them to be going for a tie */\r
+}\r
+\r
+/* You need to define a results function, even if it isn't used\r
+   (otherwise the linker will complain) */\r
+void Results( void * this, char * foeName, int isInstigatedByYou, RESULTTYPE winner,\r
+             ITEMTYPE attItem, ITEMTYPE defItem, ITEMTYPE bluffItem,\r
+             int pointDelta ) {\r
+       \r
+       return; /* Ignore whatever just happened. */\r
+}\r
+\r
+/* same for Cleanup() */\r
+\r
+void Cleanup( void * this ) {\r
+       return;\r
+}\r

UCC git Repository :: git.ucc.asn.au