Rules:

I would like to point out that this game is not based on the traditional "state table" design, but uses real logic and priorities. In addition there has been a little randomness introduced so you can actually win a game or two...