implicitly solves case where all values lead to a loss
fixes depth and value issues. now working generic minimax algorithm