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

Function getRandomPosition

app/lib/terrain-generation.js:930–935  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

928}
929
930function getRandomPosition (result) {
931 const row = Math.floor(Math.random() * result.presetSize.rows)
932 const col = Math.floor(Math.random() * result.presetSize.cols)
933 const pos = { x: 6 + 8 * col, y: 6 + 8 * row }
934 return pos
935}
936
937module.exports = {
938 presets,

Callers 4

generateEnemiesFunction · 0.85
generateGetToLocationsFunction · 0.85
generateCollectThangsFunction · 0.85
generateDefendThangsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected