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
/*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 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 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 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 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 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 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 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 |
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
var small={ | |
"noll":0, | |
"ett":1, //Only idiots say "en" as a number. | |
"två":2, | |
"tre":3, | |
"fyra":4, | |
"fem":5, | |
"sex":6, | |
"sju":7, | |
"åtta":8, |
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
// - - Hello World - - | |
#include <iostream> //For input and output. | |
using namespace std; //"std::cout" into "cout". | |
int main(){ | |
cout<<"Hello, world!\n"; | |
return 0; | |
} | |
/*C version: |
OlderNewer