Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Pong

Name: Anonymous 2009-03-20 16:43

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class ThrowAway extends Applet implements Runnable,MouseMotionListener{
    int x,y,dx,dy,p,w,h;   
    public void init(){
        w=getWidth();
        h=getHeight();
        new Thread(this).start();
        addMouseMotionListener(this);
    }
    public void render(Graphics g){       
        x+=dx;
        y+=dy;
        if(x<10||x>w-10){
            if(y>p&&y<p+30)
                dx=-dx;
            if(x<=0||x>w){
                dx=dy=1;
                x=y=w/2;
            }
        }
        if(y<0||y>h) dy=-dy;
        g.setColor(Color.black);
        g.fillRect(0, 0, w, h);
        g.setColor(Color.white);
        g.fillRect(0, p, 10, 30);
        g.fillRect(w-10, p, 120, 30);
        g.fillRect(x-1, y-1, 3, 3);
    }   
    public void run() {       
        Image buf=createImage(w,h);
        Graphics g=buf.getGraphics();
        while(true){           
            render(g);
            getGraphics().drawImage(buf,0,0,this);
            try{Thread.sleep(5);}catch(Exception ex){};
        }
    }   
    public void mouseMoved(MouseEvent e) {
        p=e.getY()-15;
    }
    public void mouseDragged(MouseEvent e){}
}

Name: Anonymous 2009-03-20 17:16

>>3
How about this then.
ha,ng,m,a,n={0:'\x03\x00\x00\x00\x00\x01',1:'\xe3R\x00\x03.$R\x01\x9d\x8dC\x18\xa1)\x1e\x02\x00V\xa9\n\x8a',2:'\xe3\xe2R\x00\x81\x1a0\x89\xc4F\x16F\xe5 \xf1\x90\xc5u\x81\x00\xc8\x8f\x8f\x8f\xaf\x01b\xb0h\r\x00\x89\xe9\x0f\xdb',3:'\xe3R\x00\x83x\x08\xe0\x02sj\xf4!\x82P\x1e\x9cF\x11\xc4\xc2C\xe6\xe8\x02\x01H\x00hh\r\x10\x83\x85k\x00\x08D\x13\xa3',4:'\xe3R\x00\x83x\x08\xe0\x02sj\xf4!\x825P.\x84\xa7\x11\xaf\x89\xc2\x8f\xa9\xd1G\xe1\xa3)\xd7W\x88A\xe6\xeb\x02\x01\x17\xd8\x9e\x1a \x06\x8b\xd6\x00\x00\x89n\x17}',5:'\xe3R\x00\x83x\x08\xe0\x02sj\xf4!\x825P.\x84\xa7\x11\xaf\x89\xc2\xd7\xaf\x89A\xe1\xa3)\xd7W\x80Is\x81\x8d\xaf\x01b\x00M\xd8\x14\xb1',},__import__('sys').stdin,__import__('sys').stdout.write,'abcdefghijklmnopqrstuvwxyz\'-0123456789',{'c':set(),'w': __import__('random').choice(open('/usr/share/dict/cracklib-small', 'rb').readlines()).strip()}
g=lambda:n.__setitem__('t',ng.read(1)) or (n['t'] in a and (n['c'].update(n['t']) or m(('x\x9c'+ha[len(n['c']-set(n['w']))]).decode('zlib')+'\n') or m(''.join([_ if _ in n['c'] else '.' for _ in n['w']]) + '\n'))) or (len(n['c']-set(n['w'])) >= 5 and (m('You lose. '+n['w']+'\n') or True)) or (set(n['w']).issubset(n['c']) and (m('You win! '+n['w']+'\n') or True)) or g();g()

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List