Skip to content

Instantly share code, notes, and snippets.

@cmar
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmar/e7a0a38c6057d9487a6f to your computer and use it in GitHub Desktop.
Save cmar/e7a0a38c6057d9487a6f to your computer and use it in GitHub Desktop.
RubyLoCo Hack Night Flag Puzzle
#!/usr/bin/env ruby
#
# This goal of this RubyLoCo Puzzle is to generate an ascii
# American Flag. Try to come up with a unique way to generate
# the flag. Below is the easiest implementation.
#
# Ruby not required! Use any langauge and pair up!
#
# If you complete the task here are some more advanced ideas:
# make the flag colored
# write a DSL to generate any flag
# animate the flag
# add a flag pole
# use emoji
#
# Happy Birthday America
puts '* * * * * * ' + '1111111111111111111111111111111111111111111'
puts ' * * * * * ' + '0000000000000000000000000000000000000000000'
puts '* * * * * * ' + '1111111111111111111111111111111111111111111'
puts ' * * * * * ' + '0000000000000000000000000000000000000000000'
puts '* * * * * * ' + '1111111111111111111111111111111111111111111'
puts ' * * * * * ' + '0000000000000000000000000000000000000000000'
puts '* * * * * * ' + '1111111111111111111111111111111111111111111'
puts '0000000000000000000000000000000000000000000000000000000'
puts '1111111111111111111111111111111111111111111111111111111'
puts '0000000000000000000000000000000000000000000000000000000'
puts '1111111111111111111111111111111111111111111111111111111'
puts '0000000000000000000000000000000000000000000000000000000'
puts '1111111111111111111111111111111111111111111111111111111'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment