Solution: Part 1

Build our own play-to-earn game.

Inheritance structure

For clarity and code maintainability, we'll separate VRF-related code from the parts of our game that don't depend on randomness.

  • TreasureHuntNoVRF.sol is a base contract containing state variables and modifiers that don't depend on the VRF.

  • TreasureHuntVRF.sol will inherit from TreasureHuntNoVRF.sol and contain all VRF-related inheritance, state variables, and an override implementation of ...