Skip to content

Commit 67b47ef

Browse files
committed
Improved Sortable comments
1 parent 5535d79 commit 67b47ef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sortable.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
#include "Sortable.h"
22

3+
/**
4+
* @brief Construct a new Sortable object. Sortables are the elements that comforms the main sorting array
5+
*
6+
* @param width width of the sortable on screen
7+
* @param height height of the sortable on screen
8+
* @param value associated value to each element used to sort
9+
*/
310
Sortable::Sortable(float width, float height, int value) {
411
this->width = width;
512
this->height = height;
613
this->value = value;
714
}
815

16+
/**
17+
* @brief Defines a shape for the sortable
18+
*
19+
* @return sf::RectangleShape prepared to be directly drawed on screen
20+
*/
921
sf::RectangleShape Sortable::shape() {
1022
return sf::RectangleShape(sf::Vector2f((float)width, (float)height));
1123
}

0 commit comments

Comments
 (0)