Added minimax function. Changed to 15x15 grid. Can also be NxN.