Making the group radius distinct from the minimum distance to connect 2 players

Also, changed default settings from 160px for Group Radius to 120px
(minimum distance to connect 2 players remains 160px)
This commit is contained in:
David Négrier 2020-05-03 16:56:19 +02:00
parent dcaf9a8e46
commit 3b27f8b000
5 changed files with 28 additions and 35 deletions

View file

@ -66,23 +66,6 @@ export class Group {
return this.users.indexOf(user) !== -1;
}
isStillIn(user: UserInterface): boolean
{
if(!this.isPartOfGroup(user)) {
return false;
}
let stillIn = true;
for(let i = 0; i <= this.users.length; i++) {
let userInGroup = this.users[i];
let distance = World.computeDistance(user, userInGroup);
if(distance > World.MIN_DISTANCE) {
stillIn = false;
break;
}
}
return stillIn;
}
/*removeFromGroup(users: UserInterface[]): void
{
for(let i = 0; i < users.length; i++){