A Programming Game!
Max Power is the man — last night he sent me a link to this Light-Bot game. I didn’t get around to playing it until just a little while ago, but I played it now, and it’s so awesome!
In the game, you program a robot to move around a grid (forward, left, right, and jumping) in order to light up the blue squares. The first couple levels get you used to the concept of the game (how to move, how to jump properly and light up the squares), and it seems easy enough.
But when you get to level 10, the number of moves available really limits you. If you had 100 slots, any level would be really easy — but you only have 12 slots in the main method and 8 in each of the 2 “functions” (misnomer — they don’t return anything…). So you have to start re-using the methods and figuring out where you can put extraneous moves that will be useful in one case but ignored in the other.
After completing level 12 (the last level), there’s a little “Congrats, you should think about programming for real!” message and it tells you how many total moves you used — my first time throgh – 189. Leave a comment with your number of moves (or complaining about a specific level that got you stuck).
3 Comments »
Leave a comment
-
Recent
-
Links
-
Archives
- January 2013 (1)
- January 2010 (1)
- April 2009 (1)
- March 2009 (7)
- December 2008 (1)
- September 2008 (6)
- August 2008 (16)
- July 2008 (17)
- June 2008 (11)
- May 2008 (10)
- April 2008 (1)
- January 2008 (7)
-
Categories
-
RSS
Entries RSS
Comments RSS
Got it down to 186… anybody have any ideas for how to do level 10 without all 28 commands?
Comment by dannyiachini | September 19, 2008
Functions don’t always return something :-P
Comment by brianghig | September 20, 2008
Depending on the language, that can be a requirement… I remember in my TurboPascal class, functions HAD to return a value and subroutines could not return anything.
From Wikipedia (yeah, not reliable, but whatever):
“Many programming languages, such as Pascal , Fortran, Ada, distinguish between functions or function subprograms, which return values (via a return statement), and subroutines or procedures, which do not. Some languages, such as C and Lisp, do not make this distinction, and treat those terms as synonymous. “
Comment by dannyiachini | September 20, 2008