Skip to content

Instantly share code, notes, and snippets.

@gabriel-almeida
gabriel-almeida / life.py
Created February 20, 2016 12:57 — forked from jsbueno/life.py
Game of Life (Python + Pygame)
# coding: utf-8
import pygame
import random
rr = random.randrange
SIZE = 800, 600
cellsize = 20
try:
@gabriel-almeida
gabriel-almeida / robot.js
Created December 2, 2012 21:01 — forked from cezarsa/robot.js
seeker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@gabriel-almeida
gabriel-almeida / robot.js
Created December 2, 2012 18:40 — forked from victorlcampos/robot.js
Bartorista
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(50);
robot.turn(90);
robot.rotateCannon(10);
robot.rotateCannon(-20);
@gabriel-almeida
gabriel-almeida / robot.js
Created December 2, 2012 18:23 — forked from victorlcampos/robot.js
Bartorista
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(50);
robot.turn(90);
robot.rotateCannon(10);
robot.rotateCannon(-20);