User:GreenSamurai/Team Spectating and Voting

PURPOSE
Current modes allow players to play on randomly assigned teams. This can be drastically improved with the addition of voting and spectating.

SPECTATING
Players joining a game will become spectators and are randomly assigned a tank to follow. Spectators can join the game pressing 'j' and will join the team of the tank they are following. If this team has the most players or if a player currently in the game leaves, one spectator will be selected at random to join the game as a new tank on the smaller team.

Only one spectator may follow a tank at a given time. Players may select a tank, by holding 'v' and clicking on a different tank. Other spectators will be able to see the name of that spectator, beneath the tank they have selected. If the tank being followed is destroyed, the two players will swap places. The spectator will begin as a tank with the associated experience and the retired player will become the spectator for that tank.

VOTING
A player may vote against another tank on their team at any point during the game. To do so, the player will simply hold 'v' and click on the tank. The selection can be cleared at any time by pressing 'v' and each player has one vote available to them. The number of votes against another tank will appear under the tank.

If 1/2 of the team selects a single tank, at the same time, that player is moved onto the other team; they may not elect to spectate a tank of the team they were voted off from. If a player is voted out of both teams, they are removed from the server.