refactor minimax

Hi.

I've refactored minimax player.

I've addressed the following issues:
 - if the game is over on the 'max' move, there's no need to ask for the 'min' move to make it's turn.
 - avoid using two similar functions 'minscore', 'maxscore' that share a lot of code.

Not sure that it should be done this way, I mean, code isn't clear enough, though couple empty lines were added.
Waiting for your comments...