a noughts and crosses game in javascript that uses a minimax algorthim to find optimum move