nl.bluering.ppracing
Class Circuit

java.lang.Object
  |
  +--nl.bluering.ppracing.Circuit

public class Circuit
extends java.lang.Object

This class constructs a new circuit, and makes a representation of it in a BufferedImage


Field Summary
 boolean correct
           
 int startx1
           
 int startx2
           
 int starty
           
 
Constructor Summary
Circuit(int sx, int sy, int chk, Ppracing p)
          Constructs a new circuit
Circuit(Ppracing p)
          For testing purposes only:
 
Method Summary
 void dographics()
          Draws the circuit
 java.lang.String download()
           
 void drawstart()
          Little function for drawing the start-finish line
 int getsizex()
           
 int getsizey()
           
 int getstartx1()
           
 int getstartx2()
           
 int getstarty()
           
 void init()
          Initialises a new circuit
static void main(java.lang.String[] ps)
           
 void paint(java.awt.Graphics g)
          Paint the buffered image onto the screen
 int terrain(int x, int y)
           
 void upload(java.lang.String s)
          Sets the circuit to the given String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

starty

public int starty

startx1

public int startx1

startx2

public int startx2

correct

public boolean correct
Constructor Detail

Circuit

public Circuit(int sx,
               int sy,
               int chk,
               Ppracing p)
Constructs a new circuit
Parameters:
sx - Horizontal size of the circuit
sy - Vertical size of the circuit
chk - Number of checkpoints, or corners in the circuit
p - Parental game object

Circuit

public Circuit(Ppracing p)
For testing purposes only:
Method Detail

init

public void init()
Initialises a new circuit

dographics

public void dographics()
Draws the circuit

terrain

public int terrain(int x,
                   int y)

getsizex

public int getsizex()

getsizey

public int getsizey()

getstarty

public int getstarty()

getstartx1

public int getstartx1()

getstartx2

public int getstartx2()

download

public java.lang.String download()
Returns:
the String version of the circuit, for uploading to network

upload

public void upload(java.lang.String s)
Sets the circuit to the given String.

paint

public void paint(java.awt.Graphics g)
Paint the buffered image onto the screen

drawstart

public void drawstart()
Little function for drawing the start-finish line

main

public static void main(java.lang.String[] ps)