Eloise-es / Eloise-es.github.io

My portfolio with all projects to this date.
https://www.eloise.es
0 stars 0 forks source link

Ping pong: Use objects to store each player's data instead of seperate variables #1

Closed Eloise-es closed 2 years ago

Eloise-es commented 2 years ago

This should optimise the code, reduce repetition and make it more flexible for future updates (e.g. adding more players if I wanted to adapt it for a different game)

I'll need to move all the current variables linked to player 1 into an object called playerOne, and the same for player 2.

Eloise-es commented 2 years ago

Completed on pull request #3