public void GenerateGrumpsReal(GreatGrand g, int num) { _Grump [] final = new _Grump[num]; for (int i = 0; i < num; i++) { bool has_targ = false; GrumpObj targ = null; while (!has_targ) { targ = GetRandomGG(g); has_targ = true; for (int x = 0; x < i; x++) { if (final[x].Target == targ) { has_targ = false; } } } int dist = _TableManager.SeatDistance(targ as GreatGrand, g); bool like = false; if (dist == 1) { like = true; } final[i] = new _Grump(like, g, targ); } g.Grumps = final; }
public int SeatDistance(GreatGrand a, GrumpObj b) { if (b is GreatGrand) { return(SeatDistance(a, b as GreatGrand)); } return(0); }
public void GenerateGrumpsPrimitive(GreatGrand g, int num) { g.Grumps = new _Grump[num]; for (int i = 0; i < num; i++) { GrumpObj targ = GetRandomGG(g); _Grump newg = new _Grump(false, g, targ); g.Grumps[i] = newg; } }
public _Grump(bool like, GreatGrand p, GrumpObj t = null) { Parent = p; Target = t; LikesIt = like; }