Attacks in a game like this require we create what I call an "attack box." Basically, this is a small rectangle that covers the area in which our attack should reach. It should only be activated when we press down on a key, and eventually, it should only register during a specific frame within an animation.
Here we'll add a basic version of attack functionality using just rectangles.
If I wanted to make a kick function (I'm having a friend do sprite animation) would I just set the box at a lower position? If so could I copy the code and modify the keydown and position functions?