League Dodger

This is a dodge game that is based on league of legends. First I created a few variables for the pictures and utilities I needed to use globally, and then I loaded up the image for the game. In the setup, i basically initialized everything including teemo's position by using a vector. Then in the draw I had a loop where if teemo touched one of the projectile, the loop would end which meant the game would end. The handlerightclick function just will record the position of the cursor whenever is pressed and will update the targetpos which updateteemoposition function will use. Generateprojectile uses the projectile class and uses vector to generate a new projectile at a random location. And then teemocollideswith will check if it collides with the projectile. Overall it was fun a project to make but too much math involved. 6/10

Link to the code