[Intro to Python as a First Language] 'class' basics: attributes & methods, w/ Pokemon!

Channel:
Subscribers:
851
Published on ● Video Link: https://www.youtube.com/watch?v=RVy_2aFZXoo



Duration: 2:55:41
133 views
4


In this episode, we're continuing our Pokemon battle example, but with a twist: we're starting from scratch to re-envision our code in a more object-oriented way.

Previously, our code flowed very straight, from top to bottom, with the exception of a loop which represented the characters indefinitely taking turns. Now, we're thinking of our game as several 'objects' interacting with each other: in this case, 'Pokemon' and 'PokemonMove's.

I would've liked to have made more progress on this example, but we ended up spending a lot of time re-capping concepts that we touched on in previous episodes. By the end, though, I've said most of what I wanted to say about the very basics of classes. In the next episode, we'll have a fully-working version of the Pokemon combat system, again, but it'll be much more flexible for being built with classes.

If you want to read this code in both commentated and condensed forms, check out our github page at http://github.com/vencabot/intro_to_python ! If you have any questions, feel free to leave them here in the comments or hang out with us on Discord using the link below. We have an #introtopython channel, there! :D

Keep the good times rolling at https://www.patreon.com/vencabot
Watch the show live at https://www.twitch.tv/vencabot
Hang with us on Discord using https://discordapp.com/invite/Y2tETWA
Keep up-to-date at https://twitter.com/vencabot




Other Videos By Vencabot


2018-11-08[Demon's Souls] Ep. 6: "Dixx Fails to Grasp the Tao of Steve, Big Bug Boogaloo!"
2018-11-07[3rd Strike] 07/03/18: Cait / Venca marathon: Ibuki versus Alex! uP_'s Urien no joke!
2018-11-05[God of War (2005)] Ep. 10: "Clipping Through the Floor, Wall-Tetris Boogaloo!"
2018-11-05[3rd Strike] 07/03/18: Spacing-practice | HereGoesNothing vs Venca | Dowaan's Oro!
2018-11-04[Fortnite: Battle Royale] The high-flying adventures of Templar, Alidir, KReichJr, & Venca!
2018-11-03[3rd Strike] 07/02/18: Threevenge training, locust3s's sweet Necro, Vitriolic's Urien
2018-11-02[Demon's Souls] Ep. 5: "Armor Spider! Deeper Into the Mines, Senseless Killing Boogaloo!"
2018-11-01[3rd Strike] 06/28/18: DaRage vs Venca megathon! Triple threat action, 'Patch' my ass!
2018-10-31[God of War (2005)] Ep. 9: "Iron Man If Iron Man Were a Minotaur, Kissy-Kissy Lips Boogaloo!"
2018-10-30[3rd Strike] 06/27/18: FT10 - Crime_Alley vs Venca! Blank_Delay's Oro, Swirlyglass's Ryu!
2018-10-29[Intro to Python as a First Language] 'class' basics: attributes & methods, w/ Pokemon!
2018-10-28[3rd Strike] 06/26/18: FT1O - Shodokan vs Venca! Twins battle! Alex's Makoto trouble
2018-10-27[Gunbound] Apples, you BUNGER!! Dixx and Venca demonstrate high-level play
2018-10-26[3rd Strike] 06/26/18: Alex vs Ken vs Ibuki, 1xide's Yang arrives. Steam version is booboo.
2018-10-25[Demon's Souls] Ep. 4: "Look at this $%^&ing SWORD!! Stonefang Tunnel Boogaloo!"
2018-10-24[3rd Strike] 06/26/18: All Ranked, all episode! PinkGiSeanIsTopTier!
2018-10-23[Intro to Python as a First Language] Functions, 'for', lists, & libraries; Pokemon gets AI!
2018-10-21[3rd Strike] 06/25/18: Threevenge training, Pyteria cracking heads, styx_diver's Ibuki!
2018-10-20[God of War (2005)] Ep. 8: "Narrow Beam Balancing, Nearing Maximum Rage Boogaloo"
2018-10-19[3rd Strike] 06/21/18: Defensive Alex & KreichJr's sickening Ken. Awaken, Crime's Q!
2018-10-18[Sonic Spinball (GG)] G-$%^&ing-G! Legends never die... They go 8-bit!



Tags:
twitch
commentary
program
let's
learning
letsplay
gaming
educational
education
development
tutoring
vencabot
intro
lets play
coding
lets
longplay
let's play
python
programming
learning to program
gameplay
game
long
software
dev
creative
engineering
stream
game play
intro to python
long play
play
tutor