Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Monaco {
struct CarData {
uint32 balance; // 0 means the car has no money.
uint32 speed; // 0 means the car isn`t moving. Each turn, the y will be updated by the speed, to next turn y will be equal to y + speed
uint32 y; // 0 means the car hasn`t moved. y is the position on the axis between 0 and 1000. Car starts at 0 and wins at 1000.
uint32 shield; // Where 0 means the car isn`t shielded.
address car; // the car address on the EVM
const fs = require('fs');
const xMonaco = fs.readFileSync('../data/0xMonaco.sol').toString();
const ICar = fs.readFileSync('../data/ICar.sol').toString();
const CarData = fs.readFileSync('../data/CarData.sol').toString();
const strategy1 = fs.readFileSync('../data/strategy_1.sol').toString();
const strategy2 = fs.readFileSync('../data/strategy_2.sol').toString();
const strategy3 = fs.readFileSync('../data/strategy_3.sol').toString();
// console.log(xMonaco);
#include <cs50.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
int height;
do
{
printf("Enter the height of the pyramid:\n");