Use this guide but remix it so that instead of players it for every team, so like every separate team I assume 4 teams so add when a counter reaches 0 it adds +1 to a counter and when that counter reaches 3 the game ends
But I think you have your answer from everyone else already