WIP
This commit is contained in:
parent
b1e757d02c
commit
275c4772d0
@ -92,14 +92,14 @@
|
||||
|
||||
function addGuess(user,position) {
|
||||
if(seed.round == undefined) return;
|
||||
let current_round = ""+seed.round;
|
||||
var current_round = ""+seed.round;
|
||||
if(guesses[current_round]==undefined) guesses[current_round] = []
|
||||
if(guesses[current_round].some((v)=>v.user==user)) return;
|
||||
if(!isCoordinates(position)) return;
|
||||
let pos = toPos(position)
|
||||
let distance = haversineDistance(pos, {lat:seed.rounds[current_round].lat,lon:seed.rounds[current_round].lon})
|
||||
var pos = toPos(position)
|
||||
var distance = haversineDistance(pos, {lat:seed.rounds[current_round].lat,lon:seed.rounds[current_round].lon})
|
||||
|
||||
let score = calculateScore(distance, scale)
|
||||
var score = calculateScore(distance, scale)
|
||||
guesses[current_round].push({
|
||||
user:user,
|
||||
location:location,
|
||||
|
Loading…
x
Reference in New Issue
Block a user