package ludumdare.game;

import java.awt.Color;
import java.awt.Graphics2D;

import org.crusty.math.Vec2double;

public class Planet extends SpaceBody {

	boolean cellularAutomata;
	
	public Planet(Sprite sprite, Vec2double pos, int diameter) {
		super(sprite, pos, diameter);
	}
	
	public void draw(Graphics2D g) {
		g.setColor(Color.WHITE);
//		g.drawLine((int) pos.x, (int) pos.y, (int) pos.x + 20, (int) pos.y - 40);
//		g.drawLine((int) pos.x + 20, (int) pos.y - 40, (int) pos.x + 20 + 10, (int) pos.y - 40);
		g.setFont(Game.smallFont);
		g.drawString("PLANET: " + name, (int) pos.x + 35, (int) pos.y - 40 - 15);
		g.drawString("Mass: " + mass, (int) pos.x + 35, (int) pos.y - 40);
		g.drawString("Atmosphere:" + atmosphere, (int) pos.x + 35, (int) pos.y - 40 + 15);
		g.drawString("CellularAutomata: " + cellularAutomata, (int) pos.x + 35, (int) pos.y - 40 + 30);
		
		super.draw(g);
	}

	public void generateRandomData() {
		
		super.generateRandomData();
		
		cellularAutomata = r.nextBoolean();
	}
	
}
