Sunday, July 31, 2016

The Code 7 Project - Problem 4 - Puzzle Game

The Code 7 Project - Problem 4 - Puzzle Game


Description of the "Code 7 Project": 
hchiam.blogspot.ca/2016/06/code-7-project-github-blog.html
Practicing general programming skills by building 7 simple programs over 7 different weekends (when my other commitments allow it).

Description of Problem 4:

blog.smartbear.com/programming/7-silly-programming-challenges-to-do-for-fun

Game Solution So Far for Problem 4:

scratch.mit.edu/projects/117437175

GitHub Repo Backup of Game Solution for Problem 4:
github.com/hchiam/code7


You can play the game right here, without having to go the any of those websites or downloading anything:  Click on the green flag to begin and start clicking the puzzle pieces to move them around.
I might update this game later.





_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics

Sunday, July 3, 2016

The Code 7 Project - Problem 3 - Turtle Drawing

(Code. Canvas. Command-line.)

The Code 7 Project - Problem 3 - Turtle Drawing

Drawing with code.  This was more of a fun exercise than it was "serious" problem-solvingBasically, for problem 3, I tested out the drawing capabilities of the Turtle extension of PythonI made it draw a certain species of fractal pattern (something like the patterns in tree branching or lung branching).  The Python code gives simple interactivity with Terminal to let you choose the number of fractal "levels" in the output drawing.  My solution just took a couple of functions to modularize things, as well as a little recursion (see example code for "tail recursion" under Problem 2).

Links to more info:

[EDIT, July 4th, 2016:  You can copy and paste this code into the interface at https://trinket.io/python
so you can test drawing with the Turtle extension without having to install Python (the tutorialspoint website isn't able to create drawings with Turtle).]

[EDIT EDIT, July 5th, 2016:  Oooor you can run the code right here:]

 

_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics