Answers for "get number of creeps screeps"

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)
Posted by: Guest on December-13-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language