• + 1 comment

    Yes you are correct. I chose to use a boolean, because I wanted whoever was reading this code to be able to easily understand what was going on and then once they understand it they can improve/change it anyway they like.