MCPcopy Create free account
hub / github.com/codecombat/codecombat / getRandomThang

Function getRandomThang

app/lib/terrain-generation.js:926–928  ·  view source on GitHub ↗
(thangList)

Source from the content-addressed store, hash-verified

924}
925
926function getRandomThang (thangList) {
927 return thangList[_.random(0, thangList.length - 1)]
928}
929
930function getRandomPosition (result) {
931 const row = Math.floor(Math.random() * result.presetSize.rows)

Callers 7

generateFloorFunction · 0.85
generateBorderFunction · 0.85
generateDecorationsFunction · 0.85
generateEnemiesFunction · 0.85
generateCollectThangsFunction · 0.85
generateDefendThangsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected