public void khoitao(int n) { m = n; this.ClientSize = new Size(64 * 5, 66 * 6); bool[] bran; bran = new bool[n]; for (int i = 0; i < n; i++) { bran[i] = false; } int nextran; int nran; num = new sohoc[n]; Random ran = new Random(); for (int i = 0; i < n; i++) { do { nextran = ran.Next(0, n); nran = nextran; } while (bran[nran] != false); num[i] = new sohoc(i); num[i].setloc(nextran); bran[nextran] = true; } }
public gameshape(sohoc[] mang,int dem, int g, int p, int s,int l) { array = mang; this.len = l; this.hours = g; this.milis = p; this.seconds = s; this.mov = dem; }