c# list get last 500 alues code example
Example 1: get number of creeps screeps
var count = Object.keys(Game.creeps).reduce(function(p, c, i, a) {return p + (Game.creeps[c].memory.role == "aRole" ? 1 : 0)}, 0)
Example 2: get first and last item list c#
List<string> _ids = new List<string>() { "aaa", "bbb", "ccc", "ddd" };
var first = _ids.First();
var last = _ids.Last();
Console.WriteLine(first);
Console.WriteLine(last);