Unlocking game assignments in Ruby code
I just wrote a little article on a study project blog, where I illustrate a few code concepts I am trying out to support unlocking and accomplishing game assignments in Ruby code.
This is what I've come up with on an abstract level:
class Assignment
def unlocked?
# Code that checks if the player is able to start
# this assignment and completed all requirements.
end
def accomplished?
# Code that actually goes out and check if
# the player has done all the things needed
# to complete this assignment.
end
end
Check out a more detailed explanation and some other samples on http://trakhamer.wordpress.com/2012/10/21/unlocking-game-assignments-in-ruby-code/
Written by Michiel Sikkes
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#