How to improve sololearn's Ruby: A Simple Game with weapons? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to improve sololearn's Ruby: A Simple Game with weapons?

I've gotten through some serious Ruby learning this week. I finally made it to this game part (plenty of samples in the playground and my slightly modified one is available). The tutorial mentions that you can improve the game, one way is adding weapons. I'm wondering how I could do that, where I add at least 4 weapons (fists, rock, knife, sword). should I add a whole weapons class or define a method within the player class? should I throw it into the fight method? change the hit method in the player class?

6th Feb 2018, 3:44 PM
The Last Finale
The Last Finale - avatar
0 Answers