Skip to main content
2 of 2
Commonmark migration

The Lover, Python

This one doesn't care about the mass of people, he only cares about one specific player and always takes the same side his significant other chose last turn.

import sys

if len(sys.argv) > 1:
    rounds = sys.argv[1].split(',')
    loved = len(rounds[0]) / 2
    lovedChoice = rounds[-1][loved]
    if lovedChoice == "1":
        print("good")
    else:
        print("evil")
else:
    print("good")

Run with:

python lover.py