add min and max calculation & replace unit number with macro
change minimax depth limit to 3