-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueues.h
More file actions
27 lines (21 loc) · 709 Bytes
/
Queues.h
File metadata and controls
27 lines (21 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef QUEUES_H
#define QUEUES_H
#include <SFML/Graphics.hpp>
#include <queue>
class Queues {
public:
void run(sf::RenderWindow &window);
private:
void enqueue(int value);
void dequeue();
void drawQueue(sf::RenderWindow &window);
std::queue<int> queue; // Queue to store integers
std::vector<sf::RectangleShape> blocks; // Visual representation of the queue
sf::Text frontLabel;
sf::Text rearLabel;
const float blockWidth = 50.0f; // Width of each block
const float blockHeight = 30.0f; // Height of each block
const float startX = 200.0f; // Starting X position of the queue
const float startY = 300.0f; // Y position of the queue
};
#endif // QUEUES_H