File indexing completed on 2024-04-28 04:05:21

0001 /*
0002     SPDX-FileCopyrightText: 2015 Jakob Gruber <jakob.gruber@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef BOARDMAP_H
0008 #define BOARDMAP_H
0009 
0010 #include <QList>
0011 
0012 #include "board.h"
0013 
0014 class BoardMap : public Board
0015 {
0016 public:
0017     /* 0 < width, height; 0.0 < box_ratio < 1.0 */
0018     BoardMap(int width, int height, double box_ratio);
0019 
0020     BoardMap(int width, int height, const QList<Board::State> &map);
0021 
0022     /* returns the total box count */
0023     int boxCount() const { return m_box_count; }
0024 
0025 private:
0026     void genRandom();
0027 
0028 private:
0029     const int m_box_count;
0030 };
0031 
0032 #endif // BOARDMAP_H