Added the wait state for the players and the supporting functions.