invert middlegame and endgame values