This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |