By using our services, you agree to our Privacy Policy. Click to accept.
150 chances to become an millionaire

150 chances to become an millionaire

#big wins#winners#games#casinos

Professional Code Refactor! (Cleaning Python Code & Rewriting it to use Classes) Video

In this video we take the code from my โ€œHow to Program a Game (in Python)โ€ tutorial and refactor it to be of a more professional quality. To do this we abstract out similar parts of the code into their own classes & files. Once the new code is written, we go through some examples of how we can extend its functionality in fun ways. We make a couple more difficult levels of the game which is made very easy by the new code architecture. The final product is a lot more similar to code you would write as a full time software developer at a company like Google, Facebook, etcโ€ฆ

As always I left a video timeline in the comments! If you enjoy this video please consider giving it a like & subscribe for future content :). If you have any questions let me know in the comments!

Follow the homies!

Source code for Game (original & refactored):

Link to original How to Program a Game (in Python) Tutorial:

Link to video on Classes & Object Oriented Programming:

Additional information on Getters & Setters:

Some great resources if you want to write better/cleaner code! (affiliate links)

Join the Python Army to get access to perks!
YouTube -
Patreon -


Follow me on social media!
Instagram |
Twitter |


Video Timeline! (& some additional resources)
0:00 Video overview & code setup
3:04 Creating a Player Class
10:43 Creating subclasses for our Enemy & HumanPlayer
11:26 Creating a Color class
14:35 Creating a screen class or all our game visuals
27:00 Creating a game class for all our game logic
32:54 Information on Getters & Setters in Python
38:09 Bringing it all together in our file!
43:36 Testing our code & Debugging issues
47:20 if _name_ == "__main__" information
48:26 Creating more difficult game levels using our new class structure!
54:00 Fixing the "cheat" where you can go off the screen
55:44 Loading in custom images as the enemy blocks

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

About the Site ๐ŸŒ

This site provides links to random videos hosted at YouTube, with the emphasis on random. ๐ŸŽฅ

Origins of the Idea ๐ŸŒฑ

The original idea for this site stemmed from the need to benchmark the popularity of a video against the general population of YouTube videos. ๐Ÿง 

Challenges Faced ๐Ÿค”

Obtaining a large sample of videos was crucial for accurate ranking, but YouTube lacks a direct method to gather random video IDs.

Even searching for random strings on YouTube doesn't yield truly random results, complicating the process further. ๐Ÿ”

Creating Truly Random Links ๐Ÿ› ๏ธ

The YouTube API offers additional functions enabling the discovery of more random videos. Through inventive techniques and a touch of space-time manipulation, we've achieved a process yielding nearly 100% random links to YouTube videos.

About YouTube ๐Ÿ“บ

YouTube, an American video-sharing website based in San Bruno, California, offers a diverse range of user-generated and corporate media content. ๐ŸŒŸ

Content and Users ๐ŸŽต

Users can upload, view, rate, share, and comment on videos, with content spanning video clips, music videos, live streams, and more.

While most content is uploaded by individuals, media corporations like CBS and the BBC also contribute. Unregistered users can watch videos, while registered users enjoy additional privileges such as uploading unlimited videos and adding comments.

Monetization and Impact ๐Ÿค‘

YouTube and creators earn revenue through Google AdSense, with most videos free to view. Premium channels and subscription services like YouTube Music and YouTube Premium offer ad-free streaming.

As of February 2017, over 400 hours of content were uploaded to YouTube every minute, with the site ranking as the second-most popular globally. By May 2019, this figure exceeded 500 hours per minute. ๐Ÿ“ˆ

List of ours generatorsโšก

Random YouTube Videos Generator

Random Film and Animation Video Generator

Random Autos and Vehicles Video Generator

Random Music Video Generator

Random Pets and Animals Video Generator

Random Sports Video Generator

Random Travel and Events Video Generator

Random Gaming Video Generator

Random People and Blogs Video Generator

Random Comedy Video Generator

Random Entertainment Video Generator

Random News and Politics Video Generator

Random Howto and Style Video Generator

Random Education Video Generator

Random Science and Technology Video Generator

Random Nonprofits and Activism Video Generator

By using our services, you agree to our Privacy Policy.
Alternative random YouTube videos generator: vTomb

YoutuBeRandom ยฉ 2024