Last active
August 29, 2015 14:12
-
-
Save stephenhandley/7faf46733dc68745d56a to your computer and use it in GitHub Desktop.
Compatriots! Soda in the drinking fountains is 100% true!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Harry Reid:FAAAAAAAAAART! *points finger at Republicans* | |
| Ted Cruz:FAAAAAAAAAAAAAAAAAAAART! *points finger at Democrats* | |
| Elizabeth Warren:FAAART! *points finger at Republicans* | |
| Jebster:FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAART! *points finger at Democrats* | |
| Compatriots! I AM DEFINITIELY NOT LYING WHEN I SAY Soda in the drinking fountains is 100% true! | |
| XOXO Harry Reid | |
| Countrymen! I AM DEFINITIELY NOT LYING WHEN I SAY Soda in the drinking fountains is 100% true! | |
| Tidings, Ted Cruz | |
| Peeps! I AM DEFINITIELY NOT LYING WHEN I SAY Soda in the drinking fountains is 100% true! | |
| Luv Elizabeth Warren | |
| Bros! I AM DEFINITIELY NOT LYING WHEN I SAY Soda in the drinking fountains is 100% true! | |
| FUCKYALL, Jebster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person | |
| @all : [] | |
| constructor : ()-> | |
| @constructor.all.push(@) | |
| @ | |
| lie : (something)-> | |
| "#{something} is 100% true!" | |
| fart : (volume)-> | |
| f = 'F' | |
| for i in [0 ... volume] | |
| f += 'A' | |
| f += 'RT!' | |
| f | |
| @fart : (volume)-> | |
| p.fart(volume) for p in @all | |
| @lie : (something)-> | |
| p.lie(something) for p in @all | |
| class Politician extends Person | |
| constructor : (args)-> | |
| super | |
| for k,v of args | |
| @[k] = v | |
| enemy : ()-> | |
| if (@party is 'Democrat') | |
| 'Republican' | |
| else | |
| 'Democrat' | |
| lie : (something)-> | |
| super("#{@address}! #{something}") + "\n#{@closing} #{@name}" | |
| fart : ()-> | |
| "#{@name}:#{super(@volume)} *points finger at #{@enemy()}s*" | |
| @lie : (something)-> | |
| super("I AM DEFINITIELY NOT LYING WHEN I SAY #{something}") | |
| p1 = new Politician( | |
| address : "Compatriots" | |
| party : "Democrat" | |
| name : "Harry Reid" | |
| closing : "XOXO " | |
| volume : 10 | |
| ) | |
| p2 = new Politician( | |
| address : "Countrymen" | |
| party : "Republican" | |
| name : "Ted Cruz" | |
| closing : "Tidings," | |
| volume : 20 | |
| ) | |
| p3 = new Politician( | |
| address : "Peeps" | |
| party : "Democrat" | |
| name : "Elizabeth Warren" | |
| closing : "Luv " | |
| volume : 3 | |
| ) | |
| p4 = new Politician( | |
| address : "Bros" | |
| party : "Republican" | |
| name : "Jebster" | |
| closing : "FUCKYALL, " | |
| volume : 100 | |
| ) | |
| console.log(Politician.fart().join('\n')) | |
| console.log('\n') | |
| console.log(Politician.lie("Soda in the drinking fountains").join('\n\n')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var Person, Politician, p, | |
| __hasProp = {}.hasOwnProperty, | |
| __extends = function(child, parent) { | |
| for (var key in parent) { | |
| if (__hasProp.call(parent, key)) | |
| child[key] = parent[key]; | |
| } | |
| function ctor() { | |
| this.constructor = child; | |
| } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor(); | |
| child.__super__ = parent.prototype; | |
| return child; | |
| }; | |
| Person = (function() { | |
| Person.all = []; | |
| function Person() { | |
| this.constructor.all.push(this); | |
| this; | |
| } | |
| Person.prototype.lie = function(something) { | |
| return "" + something + " is 100% true!"; | |
| }; | |
| Person.prototype.fart = function(volume) { | |
| var f, i, _i; | |
| f = 'F'; | |
| for (i = _i = 0; 0 <= volume ? _i < volume : _i > volume; i = 0 <= volume ? ++_i : --_i) { | |
| f += 'A'; | |
| } | |
| f += 'RT!'; | |
| return f; | |
| }; | |
| Person.fart = function(volume) { | |
| var p, _i, _len, _ref, _results; | |
| _ref = this.all; | |
| _results = []; | |
| for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
| p = _ref[_i]; | |
| _results.push(p.fart(volume)); | |
| } | |
| return _results; | |
| }; | |
| Person.lie = function(something) { | |
| var p, _i, _len, _ref, _results; | |
| _ref = this.all; | |
| _results = []; | |
| for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
| p = _ref[_i]; | |
| _results.push(p.lie(something)); | |
| } | |
| return _results; | |
| }; | |
| return Person; | |
| })(); | |
| Politician = (function(_super) { | |
| __extends(Politician, _super); | |
| function Politician(args) { | |
| var k, v; | |
| Politician.__super__.constructor.apply(this, arguments); | |
| for (k in args) { | |
| v = args[k]; | |
| this[k] = v; | |
| } | |
| } | |
| Politician.prototype.enemy = function() { | |
| if (this.party === 'Democrat') { | |
| return 'Republican'; | |
| } else { | |
| return 'Democrat'; | |
| } | |
| }; | |
| Politician.prototype.lie = function(something) { | |
| return Politician.__super__.lie.call(this, "" + this.address + "! " + something) + ("\n" + this.closing + " " + this.name); | |
| }; | |
| Politician.prototype.fart = function() { | |
| return "" + this.name + ":" + (Politician.__super__.fart.call(this, this.volume)) + " *points finger at " + (this.enemy()) + "s*"; | |
| }; | |
| Politician.lie = function(something) { | |
| return Politician.__super__.constructor.lie.call(this, "I AM DEFINITIELY NOT LYING WHEN I SAY " + something); | |
| }; | |
| return Politician; | |
| })(Person); | |
| p1 = new Politician({ | |
| address: "Compatriots", | |
| party: "Democrat", | |
| name: "Harry Reid", | |
| closing: "XOXO ", | |
| volume: 10 | |
| }); | |
| p2 = new Politician({ | |
| address: "Countrymen", | |
| party: "Republican", | |
| name: "Ted Cruz", | |
| closing: "Tidings,", | |
| volume: 20 | |
| }); | |
| p3 = new Politician({ | |
| address: "Peeps", | |
| party: "Democrat", | |
| name: "Elizabeth Warren", | |
| closing: "Luv ", | |
| volume: 3 | |
| }); | |
| p4 = new Politician({ | |
| address: "Bros", | |
| party: "Republican", | |
| name: "Jebster", | |
| closing: "FUCKYALL, ", | |
| volume: 100 | |
| }); | |
| console.log(Politician.fart().join('\n')); | |
| console.log('\n'); | |
| console.log(Politician.lie("Soda in the drinking fountains").join('\n\n')); | |
| }).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment