/convolutedcointoss

A program that returns "heads" or "tails"

Primary LanguageJavaScriptMozilla Public License 2.0MPL-2.0

convolutedcointoss

A program that returns "heads" or "tails"

Dive in and see if you can work out how.

This is a logic challenge.

This repo will increase in difficulty as I gain the ability to update it.

If you would like to make a pull request, please do so.

The more janky and perilous the code, the better.

RULES:

  1. convolutedCoinToss must be a single function that returns either "heads" or "tails"
  2. the function must be over 100 lines in length
  3. there is no maximum length, but try to keep it down to what one person would reasonably be able to read through with their own eyes in under 20 minutes
  4. each line of code is allowed to appear ONLY ONCE
  5. variations in methods that product similar results are allowed, but the exact same chars in the exact same sequence are not

PURPOSE:

To teach intermediate-level programmers new ways to produce the same results.

Thank you, happy coding!