I'd be grateful if you provide some critics/comments on the code.
You shouldn't be using system() call , it's bad practice , here's why.Yes sir, I know that using system() is a bad practice and had already gone through the article you gave me sometime ago.
If you want to clear console , you can do these.I've read that article also. Well I didn't want to use boost(since I'd have to use its addstr() and getnstr() functions and can't use std::cout and std::cin simultaneously). I'd also tried creating a clearScreen() function that'd print multiple newlines but I couldn't really get it to work neatly. I need to clear the screen only when the code is compiled in the terminal mode(i.e., without using SFML).
And why aren't you using sf::sleep() ?I've tried to create two versions in one program - one, the simple console version that does not require SFML and the other, the SFML version. So, in case someone compiles the terminal version(assuming he's not installed SFML), using sf::Sleep() won't help. If you can give me a better alternative than this, it's welcome.
Everything else looks good.Thanks! :D Glad you liked it!
Yes sir, I know that using system() is a bad practice and had already gone through the article you gave me sometime ago.First , you don't need to sir me , I am about the same age you are (If your profile is correct) :P
I've read that article also. Well I didn't want to use boost(since I'd have to use its addstr() and getnstr() functions and can't use std::cout and std::cin simultaneously). I'd also tried creating a clearScreen() function that'd print multiple newlines but I couldn't really get it to work neatly. I need to clear the screen only when the code is compiled in the terminal mode(i.e., without using SFML).That's okay then, your application is simple and using system() won't mean the end of the world,I just wanted to point it out if you didn't knew ...
That's okay then, your application is simple and using system() won't mean the end of the world,I just wanted to point it out if you didn't knew ...