Added debug texts for player and unit states
fixed bugg in the management of the player states