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
import json | |
import random | |
json_str = '''["00:00:00.000", | |
"00:00:08.840", | |
"00:04:32.840", | |
"00:06:34.520", | |
"00:09:22.440", | |
"00:11:01.960", | |
"00:12:36.160", |
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
description="ROS Randomiser" | |
local common = require("common") | |
local json = require ("dkjson") | |
math.randomseed(os.time()) | |
math.random(); math.random(); math.random() | |
running = true | |
json_string = [[ |
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
import codegen | |
def item_display_specifiers(o, display_specifiers, default): | |
first = display_specifiers.pop(0) | |
o.write(" if (display_specifier == "+str(first['display_specifier'])+") { \n") | |
o.write(" return {"+str(first['tile']['x'])+", "+str(first['tile']['y'])+"};\n") | |
o.write(" }") | |
for pair in display_specifiers: | |
o.write(" else if (display_specifier == "+str(pair['display_specifier'])+") { \n") |
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
import json | |
def get_sheet(filename, sheetname): | |
with open(filename) as f: | |
item_database = json.load(f) | |
item_db_sheets = item_database['sheets'] | |
sheets = [sh for sh in item_db_sheets if sh['name'] == sheetname] | |
sheet = sheets[0] | |
sheet_lines = sheet['lines'] |
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
10 MODE 7 | |
11 OFF | |
13 COV = 0 | |
14 WAR = 0 | |
19 PROCSCREEN(COV, WAR) | |
20 H$ = GET$ | |
30 IF H$="w" THEN WAR=WAR+1 | |
31 IF H$="e" THEN WAR=WAR-1 | |
40 IF H$="c" THEN COV=COV+1 | |
41 IF H$="v" THEN COV=COV-1 |
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
How to code for Quest | |
Josh04 | |
Introduction | |
------------------- | |
Quest is built on top of an entirely new PHP framework written by me and Greg, and it can be | |
confusing at first, especially if you haven't written a program before which follows a design | |
pattern. |