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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
starty
public int starty
startx1
public int startx1
startx2
public int startx2
correct
public boolean correct
Circuit
public Circuit(int sx,
int sy,
int chk,
Ppracing p)
- Constructs a new circuit
- Parameters:
sx
- Horizontal size of the circuitsy
- Vertical size of the circuitchk
- Number of checkpoints, or corners in the circuitp
- Parental game object
Circuit
public Circuit(Ppracing p)
- For testing purposes only:
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)