Nice project. I'll take a look at the code later, but for now I can advice you one thing: make commit messages meaningful, this may save you lots of time in the future ("When did I change X from Y?")
thanks
Elias really i appreciated, yes you are absolutely right the repo is indeed chaos and i don't use message for a commit. i don't know how to fix that but i will find a way to organize it.
I don't wanna sound like a smartass especially because I did same thing with my snake game, but you should split code in multiple files. Also you should avoid global functions.
you are most welcome. feel free to point out any error or bad habit related to code. actually the main reason for posting source code is to get feedback like is code free of bugs, what the best practice for both c++/SFML ... etc.
and for split code in multiple files, yes i'm totally agree with you. it is my bad habit i got it when i was learning c++ from free online tutorial and still stuck with me
and for avoid global functions, it is okay to use free function in c++ even better to use it with namespace which is useful to reduce potential name collisions with other libraries.