Skip to content

Instantly share code, notes, and snippets.

Tzolkin: The Mayan Calendar presents a new game mechanism: dynamic worker placement. Players representing different Mayan tribes place their workers on giant connected gears, and as the gears rotate they take the workers to different action spots.
During a turn, players can either (a) place one or more workers on the lowest visible spot of the gears or (b) pick up one or more workers. When placing workers, they must pay corn, which is used as a currency in the game. When they pick up a worker, they perform certain actions depending on the position of the worker. Actions located "later" on the gears are more valuable, so it's wise to let the time work for you – but players cannot skip their turn; if they have all their workers on the gears, they have to pick some up.
The game ends after one full revolution of the central Tzolkin gear. There are many paths to victory. Pleasing the gods by placing crystal skulls in deep caves or building many temples are just two of those many paths...
@edgahan
edgahan / protractor-scroll.js
Last active November 13, 2015 14:13
scrolling protractor
# utils.js
module.exports = {
scrollIntoView: function(el) {
browser.executeScript(function(el) {
el.scrollIntoView();
}, el.getWebElement());
}
}
@edgahan
edgahan / gist:7023047
Created October 17, 2013 11:05
Allows angular templates to reload
class Sprockets::DirectiveProcessor
# This is basically copied from https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/directive_processor.rb#L289
def process_depend_on_tree_directive(path = ".")
if relative?(path)
root = pathname.dirname.join(path).expand_path
unless (stats = stat(root)) && stats.directory?
raise ArgumentError, "depend_on_tree argument must be a directory"
end