implemented simple AI (one random move per second)