fix a bug when read board file

Add a printState function to check the game
Fix off a bug when calculate the torque