Readded calculate terminal. Also added to see if score is more than 37(which is a win)
Reducing the amount of local variables created to improve performance.
AI is finished enough for to be handed in.

What is left to do is to comment the code. If theres time I would like to improve the utility calculations.