Skip to content

Instantly share code, notes, and snippets.

View tebriel's full-sized avatar

Chris M tebriel

View GitHub Profile
#!/usr/bin/env python3
# Find 5 friday (4) the 12th's
# python3 fridays_of.py 12 4 5
import datetime
import sys
def make_get_specified_date(start, day_of_month, day_of_week):
@tebriel
tebriel / README.md
Last active August 29, 2015 13:59 — forked from visualmotive/README.md

Sticky gravity is explained in depth here: http://tetrisconcept.net/wiki/Line_clear#Sticky

The playfield is divided into connected segments using flood fill. Any blocks that are adjacent horizontally or vertically are marked as one segment, that is, they are treated as having "stuck" together. Each segment falls independently until it meets the floor or another block. Additional line clears may result.

Sample input and expected output are included in this Gist.

if (thisThing())
doThat();
else
doThis();
alsoThat();
// Is not the same as:
if (thisThing()) {