Added functionality for different game modes.