A implementation of the minimax algorthim in Javascript, HTML (canvas)