Added logic. Bots can now play to the end albeit badly