This file contains 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
React = require 'react' | |
{map} = require 'ramda' | |
{div, ul, li, button} = require ('./tag') | |
React.render ( div [ | |
div [ | |
'Assets:', | |
ul map ((a)-> li [a.type]), w.player.assets | |
] | |
button {onClick: act 'hurtAliens'}, 'Hurt aliens' | |
button {onClick: act 'getHelp'}, 'Get help' |
This file contains 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
macro bf { | |
case ($body ...) => { | |
eval('var p = 0, b = [], buf = new Buffer(1);'); | |
_bf($body ...); | |
} | |
} | |
macro _bf { | |
case (>) => { | |
eval('p++;'); | |
} |
This file contains 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
// Adds Support for localStorage to IE5-IE7 using userData | |
// <http://msdn.microsoft.com/en-us/library/ms531424(VS.85).aspx> | |
// See also <http://caniuse.com/#feat=namevalue-storage> | |
if(typeof window.localStorage === 'undefined') (function () { | |
var userdataKey = 'localStorage', | |
userdata = document.createElement('b'); | |
userdata.style.display = 'none'; | |
userdata.style.behavior = 'url("#default#userData")'; |
This file contains 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
$.fn.pollute = function (pollution) { | |
pollutants = { | |
air:"SMOAK", | |
water:"OIL", | |
noise:"BLAH" | |
} | |
window.emit = function(type) { | |
var i = Math.round(Math.random()*1000); |