Last Updated: February 25, 2016
·
820
· michiels

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/