/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package game;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;

/**
 *
 * @author A KUMA
 */
public class Score {
    int y,x,score,ys;//espacio usado para el score 
    String mostrar;
    public Score(int unX,int unY){//resibe los valores del lienzo
        x=unX;
        y=unY;
        ys=10;
    }
    public void armaScore(Graphics g){
        Font boldFont = new Font("Helvetica", Font.BOLD, 24);
        g.setFont(boldFont);
        mostrar="Score: "+score;
        g.setColor(Color.WHITE);
        g.drawString(mostrar, 20, 30);
        
    }
    public void dibuja(Graphics g){
        g.setColor(Color.BLACK);
        g.fillRect(0, 0, x, ys);
        //g.setColor(Color.red);
        g.fillRect(0, y-ys, x, 3*ys);
        armaScore(g);

    }
    public void setScore(int newScore){
        score=newScore;
    }
    public int getScore(){
        return score;
    }
}
