CAT & MOUSE GAME

This is the second program “Learning to Program with Raspberry Pi” guides you through building.

To be honest, I never thought i’d be building something so interactive so soon. I felt like a real programmer while building this. I also felt the pains from all of the syntax errors I caused building this.

A few of them being:

  • "mouse" not being able to move
  • syntax issues
  • score displaying boxes instead of actual score

All of them were very taxing and took me almost a week to figure out issue but I think my final product is close to the result in the book. 

What I learned from building Cat & Mouse:

  • variables: places where you can store values you want to use later
  • functions: a block of organized, reusable code that is used to perform a single, related action.

Below is my actual code that I followed along in the book to get them game up and running. 

Screen Shot 2017-10-11 at 8.37.01 AM.png
Screen Shot 2017-10-11 at 8.37.21 AM.png

Here is a visual representation of the how my code works after being ran in IDLE 3.  

made with ezgif.com

made with ezgif.com

I notice that in the shell it’s constantly showing red lines flowing as the game is active. If you have built this code and see some mistakes please feel free to share your fix. (:

Checkout the YouTube video of how this code works:

 

Thank for reading! (: