diff options
Diffstat (limited to 'actions/coin.py')
| -rw-r--r-- | actions/coin.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actions/coin.py b/actions/coin.py new file mode 100644 index 0000000..05dfbda --- /dev/null +++ b/actions/coin.py | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | import random | ||
| 2 | |||
| 3 | class coin: | ||
| 4 | |||
| 5 | def __init__(self): | ||
| 6 | self = [] | ||
| 7 | |||
| 8 | def getAction(self, data): | ||
| 9 | ret = int(random.random()*10) | ||
| 10 | print ret | ||
| 11 | thecoin = 'The coin lands on it\'s SIDE!!!' | ||
| 12 | if ret >= 6: | ||
| 13 | thecoin = "The coin lands on HEAD." | ||
| 14 | else: | ||
| 15 | thecoin = "The coin lands on TAILS." | ||
| 16 | input = data.split(' ') | ||
| 17 | return 'PRIVMSG ' + input[4] + ' :' + thecoin | ||