Skip to content

Instantly share code, notes, and snippets.

View itsbth's full-sized avatar

Bjørn Tore Håvie itsbth

View GitHub Profile
/*
* Game.cpp
*
* Created on: Jul 3, 2010
* Author: itsbth
*/
#include "Game.h"
#include <SFML/System/Clock.hpp>
import re
from random import randint
RANK = 10
RE = re.compile("[\w']+")
dct = dict()
def _tuples(arr, r):
'''
Created on 3. sep. 2010
@author: itsbth
'''
import re
_ESCAPE_STRING_RE = re.compile('([\1\2])')
def encode(data):
CC=gcc
CFLAGS=-Wall -std=c99 -ggdb
main: main.o hash.o
clean:
rm -f main main.o hash.o
---
- API
- AbandonQuest
- AbandonSkill
- AcceptAreaSpiritHeal
- AcceptArenaTeam
- AcceptBattlefieldPort
- AcceptDuel
- AcceptGroup
- AcceptGuild
WORLD_SIZE = [0..31]
BLOCKS = _([1, 1, 33, 34, 50]).reverse()
class Renderer
constructor: (@ctx, @grid, @terrain) ->
render: ->
for x in WORLD_SIZE
for y in WORLD_SIZE
@grid[x][y].render @, {x: x, y: y}
null
WORLD_SIZE = [0..31]
BLOCKS = _([1, 1, 33, 34, 50]).reverse()
Vector = {
add: (a, b) ->
{x: a.x + b.x, y: a.y + b.y}
subtract: (a, b) ->
{x: a.x - b.x, y: a.y - b.y}
multiply: (a, b) ->
{x: a.x * b, y: a.y * b}
WORLD_SIZE = [0..31]
BLOCKS = _([1, 1, 33, 34, 50]).reverse()
Vector = {
add: (a, b) ->
{x: a.x + b.x, y: a.y + b.y}
subtract: (a, b) ->
{x: a.x - b.x, y: a.y - b.y}
multiply: (a, b) ->
{x: a.x * b, y: a.y * b}
from lxml.etree import parse
NS = {'svg': 'http://www.w3.org/2000/svg'}
CMD = 'ctx.{0}({1}, {2});'
FUN = r'''
function (ctx) {{
ctx.save();
ctx.beginPath();
{0}
//ctx.closePath();
@itsbth
itsbth / .env
Created November 4, 2011 23:37
HUBOT_IRC_SERVER=irc.gamesurge.net
HUBOT_IRC_ROOMS=#wiremod
HUBOT_IRC_NICK=ITSBOT
HUBOT_WOLFRAM_APPID=-snip-