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

Method addAgent

src/LAMAPFVisualizer.jsx:314–330  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

312 }
313
314 addAgent(color) {
315 this.setState({
316 numAgents: this.state.numAgents + 1,
317 agents: [
318 ...this.state.agents,
319 {
320 SR: this.state.addedSRow,
321 SC: this.state.addedSCol,
322 GR: this.state.addedGRow,
323 GC: this.state.addedGCol,
324 height: this.state.addedHeight,
325 width: this.state.addedWidth,
326 color: color,
327 },
328 ],
329 });
330 }
331
332 showSnackbar(color) {
333 if (!this.state.isError) this.addAgent(color);

Callers 1

showSnackbarMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected