top of page

get_rect()

  • littlegreensoldier
  • Jun 23, 2016
  • 1 min read

I once met a guy who would randomly giggle while staring at his own code on the computer screen. Right then I thought the dude was definitely out of whack, but after a few months of coding I'm starting to empathize. When all you have to work with is pure logic, whitespace and bizarrely shortened words (sorry -- make that biz_short_words) you start to find entertainment in the most mundane corners.

So today I learned there's a function called get_rect(). ....Nah I can't even chuckle. Help

On the bright side, here's a hard-coded Memory Puzzle game, right down to the shape and color of the little icons!

asdasdasd

Green donut...blue zebra-print square...green donut -- crap, it's yellow!? Stupid colorblindness.

Full credits for the game go to Al Sweigart and his excellently written Making Games with Python and Pygame. Each new concept is thoroughly explained with small snippets of code, the content is supplemented with tips on good coding habits, and so far I haven't run into any sudden curveballs or difficulty spikes. Sure, it makes you code all 292 lines of the game before breaking it down -- and at the end you feel like you've just experienced childbirth -- but the explanation is impeccable in its detail! Highly recommended.

So after a good 10pm shower and some notemaking on the memory game's code, I'll be off to tackle Chapter 4 - Slide Puzzle. Man, I still remember promising a Snake game back when I thought all I needed was Object-Oriented Programming. But that's coming soon -- Chapter 6!

 
 
 

コメント


Who Am I?

I'm a somebody.

Archives
Search By Tags

Powered by Wix.com.

bottom of page