MCPcopy Create free account
hub / github.com/StevenLyt/mapf-visualizer / handleAddAgent

Method handleAddAgent

src/EECBSVisualizer.jsx:280–293  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

278 }
279
280 handleAddAgent(e) {
281 e.preventDefault();
282 const error =
283 this.state.addedSRow >= this.state.numRow ||
284 this.state.addedSRow < 0 ||
285 this.state.addedSCol >= this.state.numCol ||
286 this.state.addedSCol < 0 ||
287 this.state.addedGRow >= this.state.numRow ||
288 this.state.addedGRow < 0 ||
289 this.state.addedGCol >= this.state.numCol ||
290 this.state.addedGCol < 0;
291 if (error) return;
292 this.addAgentToMap();
293 }
294
295 handleAddAgentByClick() {
296 const color = randomColor();

Callers

nothing calls this directly

Calls 1

addAgentToMapMethod · 0.95

Tested by

no test coverage detected