Skip to content

Instantly share code, notes, and snippets.

contract ExampleCar is Car {
constructor(Monaco _monaco) Car(_monaco) {}
function takeYourTurn(Monaco.CarData[] calldata allCars, uint256 ourCarIndex) external override {
Monaco.CarData memory ourCar = allCars[ourCarIndex];
uint othersBalance;
for (uint i; i < allCars.length; ++i) {
if(ourCarIndex != i) {
othersBalance += allCars[i].balance;
}