Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orshahar91/lights
SFML mini-game
https://github.com/orshahar91/lights
bfs-algorithm edges game lights mini-game oop sfml sfml-game vertex
Last synced: 5 days ago
JSON representation
SFML mini-game
- Host: GitHub
- URL: https://github.com/orshahar91/lights
- Owner: Orshahar91
- Created: 2022-09-03T16:47:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-03T18:00:19.000Z (over 2 years ago)
- Last Synced: 2024-11-07T14:12:02.599Z (about 2 months ago)
- Topics: bfs-algorithm, edges, game, lights, mini-game, oop, sfml, sfml-game, vertex
- Language: C++
- Homepage:
- Size: 216 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :bulb:Lights Game:bulb:
* The project was created in order to practice Data structures, Iterator, STL algorithms and SFML.
## Prerequisites:
* SFML folder to be placed in C:\SFML, can be downloaded from : https://www.sfml-dev.org/download/sfml/2.5.1/## Guidelines
* Run this project in Visual Studio
* Make sure SFML folder is placed under C:\SFML
* Run the Game.
* Enjoy :smiley:## Gameplay
* Use the Left/Right Mouse click to rotate the light bulbs clockwise/counter-clockwise.
* The center light bulb provides 'Power'.
* The goal is to provide power to all the lightbulbs to advance to the next stage.## Levels
* File is Levels.txt
* All the stages are written in a single file.
* Every stage is seperated with a single line.
* Every light bulb is represented by 'O' character, 'M' represents the center light bulb that alawys has power.
* Right next to these characters there is a digit(1-6) to represent the number of edges for the vertex.
* After the digit there are characters to determine the direction of each vertex.
* Example: O2RL - vertex with 2 edges, one is facing right and the other is facing left.## Data Structures & Algorithms
* Used a vecotr of unique pointers for the vertexes and the edges
* Each vertex has a vector of *vertex for its neigbors.
* Used a bidirectional queue in order to flag an alreday visited vertex.## Notes
*This is a C++ CMAKE project, created with Visual Studio 2019.**Written by : Or Shahar*
![Lights](/Images/1.png)