My Project
UML Lab
Loading...
Searching...
No Matches
piece.h
Go to the documentation of this file.
1
5#ifndef MAINPROJECT_PIECE_H
6#define MAINPROJECT_PIECE_H
7
8#include <SFML/Graphics.hpp>
9
15class Piece {
16private:
20 friend class Board;
21
22public:
23
27 Piece();
28
37 void Draw(sf::RenderWindow& window); // Function to draw the piece
41bool isKing;
42 bool isAlive;
46int x;
50int y;
54sf::Color color;
55};
56
57#endif //MAINPROJECT_PIECE_H
Represents the game board and its functionality.
Definition board.h:21
Represents a checker piece on the board.
Definition piece.h:15
bool isAlive
Definition piece.h:42
sf::Color color
Color of the piece (Red or Black).
Definition piece.h:54
int x
x-coordinate of the piece on the board.
Definition piece.h:46
int y
y-coordinate of the piece on the board.
Definition piece.h:50
bool isKing
Indicates if the piece is a king (can move backwards).
Definition piece.h:41
void Draw(sf::RenderWindow &window)
Renders the checker piece on the screen.
Definition piece.cpp:17
Piece()
Default constructor for the Piece class.
Definition piece.cpp:16