Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov authored Jul 30, 2024
1 parent 89d9ae1 commit 27a8abd
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,40 @@ podman run --rm --network host -it \
-e DRIVER=/driver/mydriver.py \
quay.io/rose/rose-game-ai:latest
```

### Testing your driver

Send `car` and `track` information by uring `POST` request to your driver ( running on http://127.0.0.1:8081 ):

``` bash
curl -X POST -H "Content-Type: application/json" -d '{
"info": {
"car": {
"x": 3,
"y": 8
}
},
"track": [
["", "", "bike", "", "", ""],
["", "crack", "", "", "trash", ""],
["", "", "penguin", "", "", "water"],
["", "water", "", "trash", "", ""],
["barrier", "", "", "", "bike", ""],
["", "", "trash", "", "", ""],
["", "crack", "", "", "", "bike"],
["", "", "", "penguin", "water", ""],
["", "", "bike", "", "", ""]
]
}' http://localhost:8081/
```

The response in `JSON` format should include the car name and the recommended action:

``` json
{
"info": {
"name": "Go Cart",
"action": "pickup"
}
}
```

0 comments on commit 27a8abd

Please sign in to comment.