public static void main(String[] args) throws IOException {
		
		Game.AgentsCreation();
		
		int i;
		int teams_count =0;
			
		
		
		System.out.println("***********************************************************");
		System.out.println("Battle is about to start. All agents stats: ");
		for (i=0; i<Game.number_of_agents; i++){
			Game.all_agents[i].PrintHp();
		}

		boolean gameFinished = false;

		while (!gameFinished){
			Arrays.sort(Game.all_agents,speedcomparator);
			
			for (i=0; i < Game.number_of_agents; i++){
				if (Game.all_agents[i].IsAlive()){
					System.out.println("Now it is agent's "+ Game.all_agents[i].GetName() + " turn");
					Game.all_agents[i].Turn();
				}
				else{
					System.out.println("Agent "+ Game.all_agents[i].GetName()+ " is dead, so no turn for him :( ");
				}
			}
			
			
			System.out.println("***********************************************************");
			System.out.println("Round Finished. Agents stats: ");
			for (i=0; i<Game.number_of_agents; i++){
				Game.all_agents[i].PrintHp();
			}
			
			teams_count =0;
			for (i=1; i <= Game.number_of_teams; i++){
				if (Game.team_alive[i] != 0){
					teams_count++;
					winner = i;
				}
			}
			System.out.println("Teams count = " + teams_count);
			if (teams_count < 2){
				gameFinished = true;
				break;
			}
		}	
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		
		System.out.println("The winner is Team " + winner);

		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");
		System.out.println("*****************************************************************");

		
		
	}