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
/*paint.glsl | |
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
uniform sampler2D a; | |
const int waves = 4; | |
float random (float x) { |
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
//1-(Dungeons of Kithgard) | |
this.moveRight();this.moveDown();this.moveRight(); | |
//2-(Gems in the Deep) | |
this.moveRight();this.moveDown();this.moveUp();this.moveUp();this.moveRight(); | |
//3-(Shadow guard) | |
this.moveRight();this.moveUp();this.moveRight();this.moveDown();this.moveRight(); | |
//4-(Forgetful Gemsmith) |
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 MoveList(arr){ | |
for(var i=0;i<arr.length;i++){ | |
switch(arr[i]) { | |
case "a": me.moveLeft(); break; | |
case "w": me.moveUp(); break; | |
case "s": me.moveDown(); break; | |
case "d": me.moveRight(); break; | |
default: me.say(arr[i]); | |
} | |
} |
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
//1-(Defense of Plainswood) | |
this.buildXY('fence',40,52);this.buildXY('fence',40,20); | |
//2-(Winding Trail) | |
this.moveXY(36,60);this.moveXY(37,12);this.buildXY('fence',72,25); | |
//3-(Thumb Biter) | |
this.say('a');this.say('b');this.say('c'); | |
//4-(Burl Beets Booleans) |
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
//1-(The Mighty Sand Yak) | |
for(;;){var e=this.findNearest(this.findEnemies());if(this.distanceTo(e)<10){this.moveXY(this.pos.x+10,this.pos.y);}} | |
//2-(Oasis) | |
for(;;){var e=this.findNearest(this.findEnemies());if(e&&this.distanceTo(e)<10){this.moveXY(this.pos.x-10,this.pos.y);}else{this.moveXY(this.pos.x+10,this.pos.y);}} | |
//3-(Basin Stampede) | |
for(;;){var e=this.findNearest(this.findEnemies());var X=this.pos.x+5;var Y=17;if(e){if(e.pos.y>this.pos.y){Y-=10;}else if(e.pos.y<this.pos.y){Y+=10;}}this.moveXY(X,Y);} | |
//4-(Sarven Road) | |
for(;;){var e=this.findNearest(this.findEnemies());if(e){this.attack(e);}else{this.moveXY(this.pos.x+7,this.pos.y+9);}} | |
//5-(Crossroads) | |
var x=this.pos.x,y=this.pos.y;for(;;){var e=this.findNearestEnemy();if(e){if(e.pos.x<this.pos.x){this.buildXY("fire-trap",x-15,y);}else if(e.pos.x>this.pos.x){this.buildXY("fire-trap",x+15,y);}else if(e.pos.y<this.pos.y){this.buildXY("fire-trap",x,y-15);}else if(e.pos.y>this.pos.y){this.buildXY("fire-trap",x,y+15);}}this.moveXY(x,y);} |
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
''' | |
/*Print example*/ | |
//[0][97] | |
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++< //'a' in ASCII char is 97 | |
//[6][97] | |
++++++[>.<-] //Loop 6 times. Subtract first cell. | |
/*Input*/ | |
++++++++++++++++++++++++++++++[>,.<-] //This has 30 character limit | |
+[,.] //We could just do this. |
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
var PI=Math.PI,TAU=Math.PI*2,E=Math.E; | |
var sin=Math.sin,cos=Math.cos,tan=Math.tan,asin=Math.asin,acos=Math.acos,atan=Math.atan; | |
var sqrt=Math.sqrt,pow=Math.pow,log=Math.log,exp=Math.exp; | |
function floor(x){return arguments.length==2?Math.floor(x/arguments[1])*arguments[1]:Math.floor(x);} | |
var ceil=Math.ceil; | |
var abs=Math.abs,sign=Math.sign; | |
function random(...x){return 2===x.length?x[0]+Math.random()*(x[1]-x[0]):Math.random()*(x[0]||1);} | |
function min(...x){if(x.length===1&&Array.isArray(x[0])){x=x[0];}return Math.min(...x);} | |
function max(...x){if(x.length===1&&Array.isArray(x[0])){x=x[0];}return Math.max(...x);} | |
function mod(a,b){return((a%b)+b)%b;} |
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
#Hangman | |
import requests | |
word_site = "http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain" | |
response = requests.get(word_site) | |
words = response.content.splitlines() | |
import random | |
import re | |
def randomWord(): | |
return re.sub('(!?[^^A-z])','',random.choice(words).lower()) | |
def createArray(size,value): |
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
charmap = "!\"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_{}~" | |
function charat(str,at) return sub(str,at,at) end | |
{ | |
{"!"={{0,1,0},{0,1,0},{0,1,0},{0,0,0},{0,1,0}}}, | |
{'"'={{1,0,1},{1,0,1},{0,0,0},{0,0,0},{0,0,0}}}, | |
{"#"={{1,0,1},{1,1,1},{1,0,1},{1,1,1},{1,0,1}}}, | |
{"$"={{0,1,1},{1,1,0},{1,1,1},{0,1,1},{1,1,0}}}, | |
{"%"={{1,0,1},{0,0,1},{0,1,0},{1,0,0},{1,0,1}}}, | |
{"'"={{0,1,0},{1,0,0},{0,0,0},{0,0,0},{0,0,0}}}, | |
{"("={{0,1,0},{1,0,0},{1,0,0},{1,0,0},{0,1,0}}}, |
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 BoundingBox(x1,y1,w1,h1, x2,y2,w2,h2) | |
return x1 < x2+w2 and | |
x2 < x1+w1 and | |
y1 < y2+h2 and | |
y2 < y1+h1 | |
end | |
function math.round(n,deci)deci=10^(deci or 0)return math.floor(n*deci+.5)/deci end | |
function math.round(x)return math.floor(x+.5)end | |
function math.sign(n) return n>0 and 1 or n<0 and -1 or 0 end | |
function lerp(a,b,t) return(1-t)*a+t*b end |
OlderNewer