Qualcuno può guardarmi questo codice e dirmi cosa c'è di sbagliato e magari dirmi cosa devo cambiare poichè non capisco? Grazie
class CPlayer
{
public string Name;
public int nWins;
public int nGames;
}
public int nPlayers;
CPlayer []VettPlayers;
void PlayerConstructor(CPlayer player)
{
player.Name.ToString();
player.nWins=0;
player.nGames=0;
}
void PlayerSet(CPlayer player)
{
PlayerConstructor(player);
}
void PlayersConstructor(nPlayers, int nP, String nomi)
{
PlayerConstructor(nPlayers,[]VettPlayers);
nPlayers.nplayers = nP;
for(int i=1; i<=nP; i++)
PlayerConstructor(nPlayers.VettPlayers, nomi);
}