(e)
| 294 | } |
| 295 | |
| 296 | handleAddAgent(e) { |
| 297 | e.preventDefault(); |
| 298 | const error = |
| 299 | this.state.addedSRow >= this.state.numRow || |
| 300 | this.state.addedSRow < 0 || |
| 301 | this.state.addedSCol >= this.state.numCol || |
| 302 | this.state.addedSCol < 0 || |
| 303 | this.state.addedGRow >= this.state.numRow || |
| 304 | this.state.addedGRow < 0 || |
| 305 | this.state.addedGCol >= this.state.numCol || |
| 306 | this.state.addedGCol < 0 || |
| 307 | this.checkRowOOR() || |
| 308 | this.checkColOOR(); |
| 309 | if (error) return; |
| 310 | |
| 311 | this.addAgentToMap(); |
| 312 | } |
| 313 | |
| 314 | addAgent(color) { |
| 315 | this.setState({ |
nothing calls this directly
no test coverage detected