finished codes for hw2.
redo minmax  and added alpha-beta pruning