(color)
| 289 | } |
| 290 | |
| 291 | addAgent(color) { |
| 292 | this.setState({ |
| 293 | numAgents: this.state.numAgents + 1, |
| 294 | agents: [ |
| 295 | ...this.state.agents, |
| 296 | { |
| 297 | SR: this.state.addedSRow, |
| 298 | SC: this.state.addedSCol, |
| 299 | GR: this.state.addedGRow, |
| 300 | GC: this.state.addedGCol, |
| 301 | color: color, |
| 302 | }, |
| 303 | ], |
| 304 | }); |
| 305 | } |
| 306 | |
| 307 | removeAgent() { |
| 308 | this.setState({ toDelete: true }); |