Files
deepMiner/include/World.h
T
fegger 2780697235 Implement World rearrange and add RandomBot and main
Make World::checkEffects non-const and provide its implementation.
Add RandomBot implementation and declare a private randomNumber helper.
Add a simple main() entrypoint.
2026-04-15 14:08:52 +02:00

35 lines
783 B
C++

#pragma once
#include <vector>
class World {
/* A 3D grid world where robots can mine blocks.
Blocks have a value, some have special effects. */
public:
explicit World ( int x = 5, int y = 5, int z = 10 );
int getValue ( int x, int y, int z ) const;
void setValue ( int x, int y, int z, int value );
int getSurfaceLevel ( int x, int y ) const;
int mine ( int x, int y );
void display () const;
int getSizeX () const { return _sizeX; }
int getSizeY () const { return _sizeY; }
int getSizeZ () const { return _sizeZ; }
// stage 2
void rearrange ();
// stage 3
int checkEffects ( int x, int y );
private:
int _sizeX, _sizeY, _sizeZ;
std::vector<std::vector<std::vector<int>>> _grid;
void init ();
};