package ludumdare.game;

import java.awt.Color;
import java.awt.Graphics2D;

import org.crusty.math.Vec2double;

public class Star extends SpaceBody {

	String starType;
	
	public Star(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("STAR: " + 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("Type: " + starType, (int) pos.x + 35, (int) pos.y - 40 + 30);
		
		super.draw(g);
	}
	
	public void generateRandomData() {
		
		super.generateRandomData();
		
		String[] types = {
			"Red Dwarf",
			"White Dwarf",
			"Neutron Star",
			"Yellow Dwarf",
			"Red Giant",
			"Blue Giant",
			"Brown Dwarf",
			"Pulsar",
			"Cepheid Variable Star",
			"Quark Star",
			"Electroweak Star"
		};
		
		starType = types[r.nextInt(types.length)];
	}
	
}
