()
| 372 | } |
| 373 | |
| 374 | handleAddAgentByClick() { |
| 375 | var color = randomColor({ luminosity: "light" }); |
| 376 | while (this.state.usedColors.has(color)) { |
| 377 | color = randomColor({ luminosity: "light" }); |
| 378 | } |
| 379 | this.setState({ usedColors: this.state.usedColors.add(color) }); |
| 380 | this.setState({ startToAdd: true, colorToAdd: color, toDelete: false }); |
| 381 | } |
| 382 | |
| 383 | emptyForm() { |
| 384 | this.setState({ |