Matt's Functional Turtle Dart Game

by Matt Zimo

24 May 2017

Original:

New version:

Ooh, boy. I can’t for the life of me figure out why the thing only makes the yellow dart board. It is starting to hurt my eyes! I had a lot of trouble in general with the first function definition: getting the user to chose the color. At first, it would make the outermost ring black no matter what, but then I fixed that issue.

Another issue I had was from the dart throw function. I orignally had the variables labeled “miss” and “bullseye.” That caused some sort of error, so I changed them to 1 and 2. I still don’t know why I couldn’t just use the original names.

Matt Zimo is an information science grad student at UNC Chapel Hill. Go Vols! Find Matt Zimo on Twitter, Github, and on the web.