void setMoving(bool moving)
if(moving == true)
this->moving = true;
else if (moving == false)
this->moving = false;
Yeah it was my code when I tried to write simple game at the beginning of my programming journey. You could call me mr. Optimization.
@Ahri you think your code has a lot of ifs?
This shall be my answer. Why do you need lots of ifs, when you can have one bigass if :D