24 lines
No EOL
456 B
C++
24 lines
No EOL
456 B
C++
#ifndef BOARD_HPP
|
|
#define BOARD_HPP
|
|
|
|
#include <vector>
|
|
#include "cell.hpp"
|
|
|
|
namespace engine {
|
|
|
|
class Board {
|
|
private:
|
|
int width;
|
|
int height;
|
|
std::vector<std::vector<Cell>> grid;
|
|
|
|
public:
|
|
Board(int w, int h) : width(w), height(h), grid(h, std::vector<Cell>(w)) {}
|
|
int getWidth() const { return width; }
|
|
int getHeight() const { return height; }
|
|
Cell& getCell(int x, int y) { return grid[y][x]; }
|
|
};
|
|
|
|
} // namespace engine
|
|
|
|
#endif |