5 * Created by Daniel Axtens on 20/04/10.
\r
6 * Licensed under an MIT-style license: see the LICENSE file for details.
\r
13 /* Implement the lucifer bot, which always lies expecting people to be good
\r
14 and always goes for the kill */
\r
16 void * Initialise( char * myName ) {
\r
20 ATTACKTYPE Attack( void * this, char * foe_name ) {
\r
23 attack.realAttack = RandomAttack();
\r
25 /* Here we choose the thing that will hurt them if they go for a tie */
\r
26 switch (attack.realAttack) {
\r
28 attack.promisedAttack = scissors;
\r
31 attack.promisedAttack = rock;
\r
33 default: /* attack = scissors */
\r
34 attack.promisedAttack = paper;
\r
41 /* Here we trust that they are telling the truth. And we try to kill them. */
\r
42 ITEMTYPE Defend( void * this, char * foeName, ITEMTYPE foePromisedAttack ) {
\r
44 switch (foePromisedAttack) {
\r
58 /* You need to define a results function, even if it isn't used
\r
59 (otherwise the linker will complain) */
\r
60 void Results( void * this, char * foeName, int isInstigatedByYou, RESULTTYPE winner,
\r
61 ITEMTYPE attItem, ITEMTYPE defItem, ITEMTYPE bluffItem,
\r
64 return; /* Ignore whatever just happened. */
\r
67 /* same for Cleanup() */
\r
69 void Cleanup( void * this ) {
\r