UNPKG

agentscript

Version:

AgentScript Model in Model/View architecture

12 lines (10 loc) 398 B
export default function TwoDrawOptions(div, model, patchSize = 20) { const isNode = t => t.breed.name === 'nodes' const drawOptions = { patchesColor: 'black', turtlesColor: t => (isNode(t) ? 'red' : 'random'), turtlesShape: t => (isNode(t) ? 'circle' : 'dart'), turtlesSize: t => (isNode(t) ? 0.5 : 1.25), } return { div, patchSize, drawOptions } }