text stringlengths 3 1.18M |
|---|
package com.trilead.ssh2.channel;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
/**
* LocalAcceptThread.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: LocalAcceptThread.java,v 1.1 2007/10/15 12:49:56 cplatt... |
/*
* ConnectBot: simple, powerful, open-source SSH client for Android
* Copyright 2007 Kenny Root, Jeffrey Sharkey
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.a... |
package com.trilead.ssh2.channel;
import java.io.IOException;
import java.net.Socket;
import com.trilead.ssh2.log.Logger;
/**
* RemoteAcceptThread.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: RemoteAcceptThread.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public cl... |
package com.trilead.ssh2.channel;
/**
* X11ServerData. Data regarding an x11 forwarding target.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: X11ServerData.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*
*/
public class X11ServerData
{
public String hostname;
public int po... |
package com.trilead.ssh2.channel;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
/**
* A StreamForwarder forwards data between two given streams.
* If two StreamForwarder threads are used (one for each direction)
* then one can be configure... |
package com.trilead.ssh2;
/**
* An interface which needs to be implemented if you
* want to capture debugging messages.
*
* @see Connection#enableDebugging(boolean, DebugLogger)
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: DebugLogger.java,v 1.1 2008/03/03 07:01:36 cplattne Ex... |
package com.trilead.ssh2.log;
import com.trilead.ssh2.DebugLogger;
/**
* Logger - a very simple logger, mainly used during development.
* Is not based on log4j (to reduce external dependencies).
* However, if needed, something like log4j could easily be
* hooked in.
* <p>
* For speed reasons, the st... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* RSAPublicKey.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: RSAPublicKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class RSAPublicKey
{
BigInteger e;
BigInteger n;
public RSAPublicKey(B... |
package com.trilead.ssh2.signature;
import java.io.IOException;
import java.math.BigInteger;
import java.security.SecureRandom;
import com.trilead.ssh2.crypto.digest.SHA1;
import com.trilead.ssh2.log.Logger;
import com.trilead.ssh2.packets.TypesReader;
import com.trilead.ssh2.packets.TypesWriter;
/**
... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* RSAPrivateKey.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: RSAPrivateKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class RSAPrivateKey
{
private BigInteger d;
private BigInteger e;
priv... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* DSAPublicKey.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: DSAPublicKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class DSAPublicKey
{
private BigInteger p;
private BigInteger q;
private... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* RSASignature.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: RSASignature.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class RSASignature
{
BigInteger s;
public BigInteger getS()
{
... |
package com.trilead.ssh2.signature;
import java.io.IOException;
import java.math.BigInteger;
import com.trilead.ssh2.crypto.SimpleDERReader;
import com.trilead.ssh2.crypto.digest.SHA1;
import com.trilead.ssh2.log.Logger;
import com.trilead.ssh2.packets.TypesReader;
import com.trilead.ssh2.packets.TypesWrit... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* DSAPrivateKey.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: DSAPrivateKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class DSAPrivateKey
{
private BigInteger p;
private BigInteger q;
priv... |
package com.trilead.ssh2.signature;
import java.math.BigInteger;
/**
* DSASignature.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: DSASignature.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class DSASignature
{
private BigInteger r;
private BigInteger s;
publi... |
package com.trilead.ssh2;
/**
* Contains constants that can be used to specify what conditions to wait for on
* a SSH-2 channel (e.g., represented by a {@link Session}).
*
* @see Session#waitForCondition(int, long)
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: ChannelCondition.... |
package com.trilead.ssh2;
/**
* A <code>HTTPProxyData</code> object is used to specify the needed connection data
* to connect through a HTTP proxy.
*
* @see Connection#setProxyData(ProxyData)
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: HTTPProxyData.java,v 1.1 2007/10/15 ... |
package com.trilead.ssh2.transport;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.SecureRandom;
import java.util.Vector;
... |
package com.trilead.ssh2.transport;
/**
* NegotiateException.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: NegotiateException.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class NegotiateException extends Exception
{
private static final long serialVersionUID = 368991... |
package com.trilead.ssh2.transport;
import java.io.IOException;
/**
* MessageHandler.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: MessageHandler.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public interface MessageHandler
{
public void handleMessage(byte[] msg, int msgl... |
package com.trilead.ssh2.transport;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import com.trilead.ssh2.Connection;
/**
* ClientServerHello.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: C... |
package com.trilead.ssh2.transport;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.SecureRandom;
import com.trilead.ssh2.compression.ICompressor;
import com.trilead.ssh2.crypto.cipher.BlockCipher;
import com.trilead.ssh2.crypto.cipher.CipherInputSt... |
package com.trilead.ssh2.transport;
/**
* NegotiatedParameters.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: NegotiatedParameters.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class NegotiatedParameters
{
public boolean guessOK;
public String kex_algo;
public Stri... |
package com.trilead.ssh2.transport;
import java.io.IOException;
import java.security.SecureRandom;
import com.trilead.ssh2.ConnectionInfo;
import com.trilead.ssh2.DHGexParameters;
import com.trilead.ssh2.ServerHostKeyVerifier;
import com.trilead.ssh2.compression.CompressionFactory;
import com.trilead.ssh2.... |
package com.trilead.ssh2.transport;
/**
* KexParameters.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: KexParameters.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class KexParameters
{
public byte[] cookie;
public String[] kex_algorithms;
public String[] server_hos... |
package com.trilead.ssh2.transport;
import java.math.BigInteger;
import com.trilead.ssh2.DHGexParameters;
import com.trilead.ssh2.crypto.dh.DhExchange;
import com.trilead.ssh2.crypto.dh.DhGroupExchange;
import com.trilead.ssh2.packets.PacketKexInit;
/**
* KexState.
*
* @author Christian Plattner, p... |
package com.trilead.ssh2;
/**
* In most cases you probably do not need the information contained in here.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: ConnectionInfo.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class ConnectionInfo
{
/**
* The used key exchange ... |
package com.trilead.ssh2.crypto.cipher;
/*
This file was shamelessly taken from the Bouncy Castle Crypto package.
Their licence file states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any perso... |
package com.trilead.ssh2.crypto.cipher;
import java.io.IOException;
import java.io.InputStream;
/**
* CipherInputStream.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: CipherInputStream.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public class CipherInputStream
{
BlockC... |
package com.trilead.ssh2.crypto.cipher;
/**
* CBCMode.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: CBCMode.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public class CBCMode implements BlockCipher
{
BlockCipher tc;
int blockSize;
boolean doEncrypt;
byte[] cbc_vector... |
package com.trilead.ssh2.crypto.cipher;
/*
This file is based on the 3DES implementation from the Bouncy Castle Crypto package.
Their licence file states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charge... |
package com.trilead.ssh2.crypto.cipher;
/**
* This is CTR mode as described in draft-ietf-secsh-newmodes-XY.txt
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: CTRMode.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public class CTRMode implements BlockCipher
{
byte[] X;
byte... |
package com.trilead.ssh2.crypto.cipher;
import java.io.IOException;
import java.io.OutputStream;
/**
* CipherOutputStream.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: CipherOutputStream.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public class CipherOutputStream
{
Bl... |
package com.trilead.ssh2.crypto.cipher;
import java.util.Vector;
/**
* BlockCipherFactory.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: BlockCipherFactory.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $
*/
public class BlockCipherFactory
{
static class CipherEntry
{
Str... |
package com.trilead.ssh2.crypto.cipher;
/**
* BlockCipher.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: BlockCipher.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public interface BlockCipher
{
public void init(boolean forEncryption, byte[] key);
public int getBlockSize()... |
package com.trilead.ssh2.crypto.cipher;
/*
This file was shamelessly taken (and modified) from the Bouncy Castle Crypto package.
Their licence file states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charg... |
package com.trilead.ssh2.crypto.cipher;
/*
This file was shamelessly taken from the Bouncy Castle Crypto package.
Their licence file states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any perso... |
package com.trilead.ssh2.crypto.cipher;
/**
* NullCipher.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: NullCipher.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
*/
public class NullCipher implements BlockCipher
{
private int blockSize = 8;
public NullCipher()
{
}
pu... |
package com.trilead.ssh2.crypto.digest;
import java.math.BigInteger;
/**
* HashForSSH2Types.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: HashForSSH2Types.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class HashForSSH2Types
{
Digest md;
public HashForSSH2Type... |
package com.trilead.ssh2.crypto.digest;
/**
* MAC.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: MAC.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public final class MAC
{
Digest mac;
int size;
public final static String[] getMacList()
{
/* Higher Priority First ... |
package com.trilead.ssh2.crypto.digest;
/**
* HMAC.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: HMAC.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public final class HMAC implements Digest
{
Digest md;
byte[] k_xor_ipad;
byte[] k_xor_opad;
byte[] tmp;
int size... |
package com.trilead.ssh2.crypto.digest;
/**
* MD5. Based on the example code in RFC 1321. Optimized (...a little).
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: MD5.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
/*
* The following disclaimer has been copied from RFC 1321:
... |
package com.trilead.ssh2.crypto.digest;
/**
* SHA-1 implementation based on FIPS PUB 180-1.
* Highly optimized.
* <p>
* (http://www.itl.nist.gov/fipspubs/fip180-1.htm)
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: SHA1.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public... |
package com.trilead.ssh2.crypto.digest;
/**
* Digest.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: Digest.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public interface Digest
{
public int getDigestLength();
public void update(byte b);
public void update(byte[] b);... |
package com.trilead.ssh2.crypto;
import java.io.CharArrayWriter;
import java.io.IOException;
/**
* Basic Base64 Support.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: Base64.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class Base64
{
static final char[] alphabet... |
package com.trilead.ssh2.crypto;
import java.io.IOException;
import java.math.BigInteger;
/**
* SimpleDERReader.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: SimpleDERReader.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class SimpleDERReader
{
byte[] buffer;
i... |
package com.trilead.ssh2.crypto;
import java.io.BufferedReader;
import java.io.CharArrayReader;
import java.io.IOException;
import java.math.BigInteger;
import com.trilead.ssh2.crypto.cipher.AES;
import com.trilead.ssh2.crypto.cipher.BlockCipher;
import com.trilead.ssh2.crypto.cipher.CBCMode;
import com.t... |
package com.trilead.ssh2.crypto;
import com.trilead.ssh2.compression.CompressionFactory;
import com.trilead.ssh2.crypto.cipher.BlockCipherFactory;
import com.trilead.ssh2.crypto.digest.MAC;
import com.trilead.ssh2.transport.KexManager;
/**
* CryptoWishList.
*
* @author Christian Plattner, plattner@t... |
package com.trilead.ssh2.crypto.dh;
import java.math.BigInteger;
import java.security.SecureRandom;
import com.trilead.ssh2.DHGexParameters;
import com.trilead.ssh2.crypto.digest.HashForSSH2Types;
/**
* DhGroupExchange.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: DhGroup... |
package com.trilead.ssh2.crypto.dh;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.SecureRandom;
import com.trilead.ssh2.crypto.digest.HashForSSH2Types;
import com.trilead.ssh2.log.Logger;
/**
* DhExchange.
*
* @author Christian Plattner, plattner@t... |
package com.trilead.ssh2.crypto;
/**
* Parsed PEM structure.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: PEMStructure.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class PEMStructure
{
public int pemType;
String dekInfo[];
String procType[];
public byte[] d... |
package com.trilead.ssh2.crypto;
import java.math.BigInteger;
import com.trilead.ssh2.crypto.digest.HashForSSH2Types;
/**
* Establishes key material for iv/key/mac (both directions).
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: KeyMaterial.java,v 1.1 2007/10/15 12:49:56 cpl... |
package com.trilead.ssh2;
/**
* A <code>SFTPv3DirectoryEntry</code> as returned by {@link SFTPv3Client#ls(String)}.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: SFTPv3DirectoryEntry.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
public class SFTPv3DirectoryEntry
{
/**
... |
package com.trilead.ssh2.util;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collections;
import java.util.LinkedList;
import com.trilead.ssh2.log.Logger;
/**
* TimeoutService (beta). Here you can register a timeout.
* <p>
* Implemented having large scale programs in mi... |
package com.trilead.ssh2.util;
/**
* Tokenizer. Why? Because StringTokenizer is not available in J2ME.
*
* @author Christian Plattner, plattner@trilead.com
* @version $Id: Tokenizer.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
*/
public class Tokenizer
{
/**
* Exists because StringTokenizer is n... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain th... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
Copyright (c) 2001 Lapo Luchini.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
... |
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
Copyright (c) 2001 Lapo Luchini.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code ... |
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code ... |
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Class to represent Simon's health bar
*/
public class Health extends Actor
{
private int hitPoints;
private GreenfootImage[] healthBar;
private retroWorld theWorld;
Simon simon;
Label label;
... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Lolzturtle here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Lolzturtle extends Actor
{
private GreenfootImage[] pic;
private int counter;
publ... |
/**
* This class is intended to be used with Greenfoot to allow the programmer
* to load and play midi files. This class should be included in a
* Greenfoot project as a support (other) class. Then the programmer can
* create a MidiPlayer object. This class was created with help from
* the java programming gu... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The Ending Screen for the game
*/
public class EndingScreen extends Actor
{
retroWorld theWorld;
WavPlayer soundBite;
PlayAgainButton playAgainButton;
public EndingScreen()
{
soundBite = new WavPlayer... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
import java.util.*;
public class retroWorld extends World
{
MidiPlayer music;
WavPlayer soundBite;
WavPlayer musicWAV;
//coin c;
Simon simon;
Health health;
coin monedas;
Gam... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Bullet's shot by Dr. Wily
*/
public class Bullet extends Mover
{
Simon simon;
Health health;
retroWorld theWorld;
/**
* Act - do whatever the Bullet wants to do. This method is called whenever
* the 'Ac... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class StartButton here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class StartButton extends Actor
{
/**
* Act - do whatever the StartButton wants to do. This met... |
import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot)
/**
* A Mover is an actor that also has 'move' and 'turn' ability. Both moving and turning
* are relative to its current position. When moving, the Mover will move in the direction
* it is currently facing.
*
* Both 'move' and 'turn' methods... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class BackButton here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class BackButton extends Actor
{
/**
* Act - do whatever the BackButton wants to do. This method... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class GameOver1 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class GameOver1 extends Actor
{
/**
* Act - do whatever the GameOver1 wants to do. This method is ... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Title here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Title extends Actor
{
/**
* Act - do whatever the Title wants to do. This method is called when... |
/**
* This class is meant to be used as an "Other" class in Greenfoot. It will
* allow you to create a WavPlayer object so that you can start and stop
* background music. At this moment pausing is not possible.
*
* @author Jeremiah Davis
* @version .4
*
*/
import javax.sound.sampled.AudioInputStream;
import ... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Label here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Label extends Actor
{
public Label(String text)
{
GreenfootImage img=new GreenfootImage(t... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class playAgainButton here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class PlayAgainButton extends Actor
{
/**
* Act - do whatever the playAgainButton wants to ... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class coin here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class coin extends Actor
{
private int hitPoints;
private retroWorld theWorld;
private Green... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class InstructionScreen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class InstructionScreen extends Actor
{
/**
* Act - do whatever the InstructionScreen wan... |
/**
* Write a description of class Enemy here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Enemy
{
private int enemyType; //Type of enemy
private int scrollPos; //Scroll position to trigger a certain enemy (negative number)
/**
* Constructor for objects of ... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class GameOver here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class GameOver extends Actor
{
/**
* Act - do whatever the GameOver wants to do. This method is ca... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The Main Protagonist of the game - Castlevania's Simon Belmont
*/
public class Simon extends Actor implements Runnable
{
private int speed;
private int vSpeed;
private int acceleration;
private int jumpStrength;
... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Goomba from Super Mario Bros.
*/
public class Goomba extends Mover implements Runnable
{
private GreenfootImage[] walk;
private retroWorld theWorld;
private int a=0;
private int vSpeed; //Current falling speed
... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class CreditsScreen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class CreditsScreen extends Actor
{
/**
* Act - do whatever the CreditsScreen wants to do. Th... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Werewolf from Castlevania II
*/
public class Werewolf extends Mover implements Runnable
{
private GreenfootImage[] walkLeft;
private GreenfootImage[] walkRight;
private GreenfootImage[] death;
private retroWor... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Zombie Enemy from Castlevania II
*/
public class Zombie extends Mover implements Runnable
{
private GreenfootImage[] walkLeft;
private GreenfootImage[] death;;
private retroWorld theWorld;
private int walkCounter =... |
import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot)
import java.util.*;
/**
* An explosion. It starts by expanding and then collapsing.
* The explosion will explode other obejcts that the explosion intersects.
*
* @author Poul Henriksen
* @version 1.0.1
*/
public class Explosion extends Acto... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Class to represent Simon's health bar
*/
public class Health extends Actor
{
private int hitPoints;
private GreenfootImage[] healthBar;
private retroWorld theWorld;
Simon simon;
Label label;
... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Lolzturtle here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Lolzturtle extends Actor
{
private GreenfootImage[] pic;
private int counter;
publ... |
/**
* This class is intended to be used with Greenfoot to allow the programmer
* to load and play midi files. This class should be included in a
* Greenfoot project as a support (other) class. Then the programmer can
* create a MidiPlayer object. This class was created with help from
* the java programming gu... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The ChatLog - Chris Hansen's only weak point
*/
public class ChatLog extends Actor implements Runnable
{
retroWorld theWorld;
Simon simon;
Health health;
private int hitPoints = 10;
private boolean al... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The Ending Screen for the game
*/
public class EndingScreen extends Actor
{
retroWorld theWorld;
WavPlayer soundBite;
PlayAgainButton playAgainButton;
public EndingScreen()
{
soundBite = new WavPlayer... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
import java.util.*;
public class retroWorld extends World
{
MidiPlayer music;
WavPlayer soundBite;
WavPlayer musicWAV;
Simon simon;
Health health;
GameOver gameover;
Title titl... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Bullet's shot by Dr. Wily
*/
public class Bullet extends Mover
{
Simon simon;
Health health;
retroWorld theWorld;
/**
* Act - do whatever the Bullet wants to do. This method is called whenever
* the 'Ac... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class StartButton here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class StartButton extends Actor
{
/**
* Act - do whatever the StartButton wants to do. This met... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.