public void CreaSquadra() { RandomFiller.RandomFiller rndfl = new RandomFiller.RandomFiller(); Team sq = new Team("Banana UTD"); for (int i = 0; i < 11; i++) { Player uno = new Player(rndfl.getName(), rndfl.getSurname(), rndfl.getAge(), rndfl.getAvgSkill(), rndfl.getRole()); sq.addPlayer(uno); //Console.WriteLine(uno.ToString()); } Console.WriteLine(sq.ToStringFull()); }
public void TestGiocatoriPerOgniRuoloperSquadra() { List<Player> players = GameUtils.getRandomPlayersList(20); Team t = new Team("Juventus"); foreach (Player item in players) { t.addPlayer(item); } Console.WriteLine(t.ToStringFull()); int[] plfr = Module.playersForRolesinTeam(t); List<string> rol = Module.getRoles(); int length = plfr.Count(); for (int i = 0; i < length; i++) { if (plfr[i] > 0) { Console.WriteLine(rol.ElementAt(i)+" : "+plfr[i].ToString()); } } }
public void TestModuloEValidita() { Module m = new Module("4-4-2"); List<Player> players = GameUtils.getRandomPlayersList(20); Team t = new Team("Ababa"); foreach (Player item in players) { t.addPlayer(item); } Console.WriteLine(t.ToStringFull()); if (m.check(t, m)) Console.WriteLine("OK"); else Console.WriteLine("Nope"); }