Python Object Oriented Example Project

Veröffentlicht am: 02 Februar 2021
auf dem Kanal: CodingNomads
40,886
750

Did you always want to write your own computer game? In this Python Object Oriented Example you'll learn how to use Python Object Oriented Programming to build a small game that you can play in your Python REPL.

You'll build a tiny implementation of a Pokemon-like game that allows you to create little creatures, feed them to gain health, and let them battle against each other.

Concepts Covered
Python Object Oriented Programming
Game logic
Instance methods
@staticmethod
Instance attributes, self
Dunder methods: _init__, __str_
if _name_ == '__main__'
Importing your own code
breakpoint() debugging

Chapters:
0:00 Intro
4:22 Starting the project in VS code
6:50 Creating your own objects
9:32 Using python to help write code
12:42 Creating an instance of the class
15:21 Adding attributes
19:10 Dunder init
22:52 Primary type input
26:24 Dunder string
28:18 If Dunder name = Dunder main
32:18 The functionality of the game
39:13 Increasing hp by feeding the Pokémon
42:05 Writing the battling functions
47:24 Deciding the winner with step rate functions
53:36 Using a list lookup to declare a winner
59:54 Testing it out
1:05:10 Recap of the code

Resources:
👾 GitHub Repo for this code: https://github.com/CodingNomads/pytho...
📺 Twitch for Future Trainings:   / codingnomads  
🎓 Start Learning Python for Free: https://platform.codingnomads.co/learn/
🧭 Website: https://codingnomads.co/


Auf dieser Seite können Sie das Online-Video Python Object Oriented Example Project mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CodingNomads 02 Februar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 40,886 Mal angesehen und es wurde von 750 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!