Skip to content

Instantly share code, notes, and snippets.

@Ephellon
Created October 15, 2015 22:47
Show Gist options
  • Save Ephellon/2f8682ed87132bcb4a6e to your computer and use it in GitHub Desktop.
Save Ephellon/2f8682ed87132bcb4a6e to your computer and use it in GitHub Desktop.
Tuxedo Script: Racers Example
<script type=text/ts>
##!, strict mode required for advanced features
## +clean
## +eval
## +js-editor
## +legacy
## +math
## +wordy
## +advance
#gold, silver, rest.
$medals first, second, others... {
gold = first.
silver = second.
rest = others.
}
#contenders = ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jingjing", "Tyson Gay", "Asafa Powell", "Usain Bolt"].
medals(contenders...).
$doc.body.$html += ("<b gold>Gold</b>: <b name>${gold}</b><br/>").
$doc.body.$html += ("<b silver>Silver</b>: <b name>${silver}</b><br/>").
$doc.body.$html += ("<b other>Contenders</b>: <b name>${rest}</b><br/>").
</script>
<script src="http://codepen.io/Ephellon/pen/EVxVaJ.js"></script>
body {
background: #000;
color: #fff;
font-family: arial, monospace;
}
b {
color: #ae94c0;
}
[gold] {
color: gold;
}
[silver] {
color: silver;
}
[other] {
color: #efc371;
}
[name] {
color: #dd925f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment