<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Sprites;

import javafx.scene.image.*;

/**
 *
 * @author Ruslan
 */
public abstract class Sprite extends ImageView {
    
    public static String imageName;
    
    private double width;
    private double height;
    
    public double health = 100;
    public HealthBar healthBar;
       
    
    
    public double height() {<commit_msg>revises constructor to include x,y coorinates<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Sprites;

import javafx.scene.image.*;

/**
 *
 * @author Ruslan
 */
public abstract class Sprite extends ImageView {
    
    public static String imageName;
    
    private double width;
    private double height;
    
    public double health = 100;
    public HealthBar healthBar;
       
    
    public Sprite(String image, double x, double y) {
        
        if (image == null) {
            System.out.println("Forgot to pass image into sprite being created!");
        }
                
        this.setImage(new Image(getClass().getResourceAsStream(image)));
        
        this.width = this.getImage().getWidth();
        this.height = this.getImage().getHeight();
        
        this.setTranslateX( x -  width/2 );
        this.setTranslateY( y - height/2 );
        
    }
    
    public double height() {
{'fraction_non_alphanumeric': 0.0857843137254902, 'fraction_numerical': 0.004901960784313725, 'mean_word_length': 2.380952380952381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3590642', 'n_tokens_mistral': 443, 'n_tokens_neox': 434, 'n_words': 153}