I've been working on converting an old server from a Flash game into something I can use as a starting point for a new server-client system, however I just hit a stopping point I can't really figure out. Can someone look at this code and possibly translate it into C#?
var dists:Array = [];
for(a=0;a<deltas.length;a++) {
dists.push({offset:Math.abs(deltas[a]-avg),
time:deltas[a],
toString:function(){
return "offset:" +
this.offset + ",
time: " + this.time }
})
}
As a note, these numbers are doubles - aside from the int in the for loop. And further clarification, Dists I've translated into a double list array, but that might be wrong. This is what I have so far:
List<Double> Dist = new List<double>();
for (int i = 0; i < Deltas.Count; i++)
{
Dist.Add(Math.Abs(Deltas[i] - Average));
}