Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
board_layout.h
Go to the documentation of this file.
1#ifndef BOARD_LAYOUT_H
2#define BOARD_LAYOUT_H
3
4#include "screen_rect.h"
5
6#include "square_layout.h"
7
8#include <vector>
9
15{
16public:
22
24 const screen_rect& get_board() const noexcept;
25
33 const square_layout& get_square(const int x, const int y) const;
34
35private:
36
37 screen_rect m_background;
38
39 //std::vector<std::vector<screen_rect>> m_rects;
40 std::vector<std::vector<square_layout>> m_rects;
41};
42
43int get_height(const board_layout& b);
44
45int get_width(const board_layout& b);
46
48
49#endif // BOARD_LAYOUT_H
50
int get_width(const board_layout &b)
Definition board_layout.cpp:66
int get_height(const board_layout &b)
Definition board_layout.cpp:61
void test_board_layout()
Definition board_layout.cpp:84
The layout of a chess board.
Definition board_layout.h:15
const square_layout & get_square(const int x, const int y) const
Get the rectangle for the square.
Definition board_layout.cpp:72
const screen_rect & get_board() const noexcept
Get the size of the entire board.
Definition board_layout.cpp:56
The coordinate on a screen.
Definition screen_coordinate.h:12
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
The layout of a square.
Definition square_layout.h:61