tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code25:15

Refactoring a Rock Paper Scissors Lizard Spock Game // Part 2

ArjanCodes ↗

From the creator

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. This is the second and final part of refactoring a Rock-Paper-Scissors-Lizard-Spock game. In this part, I refactor the game logic and improve the way that the rules are represented in the code. The code I worked on in this episode is available here: https://github.com/arjancodes/2022-coderoast-rpsls. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/ 🔖 Chapters: 0:00 Intro 1:33 What we've done so far 2:05 Printing the score board 3:14 Improving the Rules class 7:56 Updating the Game class with the new rules mechanism 11:12 Cleaning up the Game initializer 13:02 Turning Game into a dataclass 14:10 Remove coupling between Scoreboard and Game 19:08 Improving the Enum representation 23:52 Final thoughts #arjancodes #softwaredesign #python

Published 2022-04-15 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code