Yeah, there's definitely a bunch of issues and I didn't manage to put in a proper win/lose state in there either :(
I am working on refining it and ironing out all the bugs though! I'll have an updated version up after the voting period :)