Skip to content

Instantly share code, notes, and snippets.

View djanatyn's full-sized avatar

Jonathan Strickland djanatyn

View GitHub Profile
#!/usr/bin/perl -w
use strict;
use warnings;
use SDL;
use SDLx::App;
use SDL::Event;
use SDL::Events;
#!/usr/bin/perl -w
use strict;
use warnings;
use SDL;
use SDLx::App;
use SDLx::Text;
use SDL::Event;
use SDL::Events;
#!/usr/bin/perl -w
use strict;
use warnings;
use SDL;
use SDLx::App;
use SDL::Event;
use SDL::Events;
<html>
<head>
<title>perlpaste</title>
<style>
body {
font-family:sans-serif; }
pre {
width:80em; }
#header {
width:100%;
@djanatyn
djanatyn / Main.as
Created August 17, 2011 00:59
java looks like actionscript
package
{
import net.flashpunk.Engine;
import net.flashpunk.FP;
public class Main extends Engine
{
public function Main()
{
super(800, 600, 60, false);
import sys, pygame
pygame.init()
clock = pygame.time.Clock()
size = width, height = 640, 480
speed = [0,0]
black = 0, 0, 0
quitting_time = 0
screen = pygame.display.set_mode(size)
@djanatyn
djanatyn / game.py
Created August 17, 2011 23:28
getting some experience with pygame :D
import sys, pygame
pygame.init()
class player:
def __init__(self,posx,posy):
self.position = [posx,posy]
def jump(self):
self.jumping = True
self.velocity = 0
import pygame
pygame.init()
clock = pygame.time.Clock()
size = 100, 100
screen = pygame.display.set_mode(size)
wall = pygame.image.load("wall.png")
floor = pygame.image.load("floor.png")
@djanatyn
djanatyn / fizzbuzz.pl
Created August 29, 2011 21:02
perl 6 fizzbuzz
use v6;
for 1..100 {
if $_ %% 3 {
if $_ %% 5 { say "FizzBuzz!"; }
else { say "Fizz!"; }
}
elsif $_ %% 5 { say "Buzz!"; }
else { .say; }
}
@djanatyn
djanatyn / fizzbuz.pl
Created August 30, 2011 00:41
fizzbuzz in perl 6
use v6;
my $say;
for 1..100 {
if $_ %% 3 {
if $_ %% 5 { $say = "FizzBuzz!"; }
else { $say = "Fizz!"; }
}
elsif $_ %% 5 { $say = "Buzz!"; }
else { $say = $_; }