RPSLS - Project

Looking for advise and pointers on the code, thanks in advance!



Nice job! Thanks for sharing and welcome to the forums :slight_smile:

Some DRY principle (don’t repeat yourself) stuff like:

  • You could probably map the rock/paper/scissors etc. to a hash map.
  • The user and computer conditional code is exactly the same. You can just write it once and have a boolean tracker for who it is evaluating. You might need a small helper function but it’ll save a lot of lines of code
  • same idea with the victory conditions. They work, but it can be half the code.
1 Like