first go at getting the minimax algorithm to work.. not working about code structure, just trying to understand the algorithm