A simple and naive implementation of the minmax algorithm