public Team(Game c,gameClient g) { // Network Version Of Team r = new Random(seed); seed = Convert.ToInt32(System.DateTime.Now.Millisecond); creator = c; myClient = g; teamName = myClient.name; tanks[0] = new Tank(creator,this,"tank1",r.Next(800),r.Next(200));//these should have random X,Y s tanks[1] = new Tank(creator,this,"tank2",r.Next(800),r.Next(200)); tanks[2] = new Tank(creator,this,"tank3",r.Next(800),r.Next(200)); tanks[3] = new Tank(creator,this,"tank4",r.Next(800),r.Next(200)); }
private void lstTeams_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { /* * If you click on lstTeams the team you click on will be added to myclients */ if(mySocket[this.lstTeams.SelectedIndex] != null) { myClients[currentClient] = new gameClient(this.mySocket[this.lstTeams.SelectedIndex],"test"); updateCurrentTeams(); } nextClient(); }
private void lstLocalTeams_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(this.lstLocalTeams.SelectedItem != null && currentClient<4) { myClients[currentClient] = new gameClient(lstLocalTeams.SelectedItem.ToString()); //MessageBox.Show(lstLocalTeams.SelectedItem.ToString()); updateCurrentTeams(); nextClient(); } }