package de.gurkenlabs.litiengine;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

@XmlRootElement(name = "info")
public class GameInfo {
  @XmlElement
  private String cooperation;

  @XmlElement
  private String description;

  private String[] developers;

  private String emitterDirectory;

  private String icon;

  private String logo;
  @XmlElement
  private String name;
  private float renderScale;
  private String spritesDirectory;
  @XmlElement
  private String subTitle;
  @XmlElement
  private float version;

  public GameInfo() {
    this.cooperation = "gurkenlabs";
    this.name = "LITIengine Game";
    this.subTitle = "The ultimate java game engine";
    this.description = "A game, created with the allmighty LITIengine.";
    this.developers = new String[] { "Steffen Wilke", "Matthias Wilke" };
    this.icon = "";
    this.logo = "";
    this.version = 1.0f;

    this.renderScale = 3.0f;
    this.spritesDirectory = "sprites/";
    this.emitterDirectory = "emitters/";
  }

  @XmlTransient
  public String getCooperation() {
    return this.cooperation;
  }

  @XmlTransient
  public String getDescription() {
    return this.description;
  }

  @XmlTransient
  public String[] getDevelopers() {
    return this.developers;
  }

  public String getEmitterDirectory() {
    return this.emitterDirectory;
  }

  @XmlTransient
  public String getIcon() {
    return this.icon;
  }

  @XmlTransient
  public String getLogo() {
    return this.logo;
  }

  @XmlTransient
  public String getName() {
    return this.name;
  }

  @XmlTransient
  public float getRenderScale() {
    return this.renderScale;
  }

  @XmlTransient
  public String getSpritesDirectory() {
    return this.spritesDirectory;
  }

  @XmlTransient
  public String getSubTitle() {
    return this.subTitle;
  }

  @XmlTransient
  public float getVersion() {
    return this.version;
  }

  public void setCooperation(final String cooperation) {
    this.cooperation = cooperation;
  }

  public void setDescription(final String description) {
    this.description = description;
  }

  public void setDevelopers(final String[] developers) {
    this.developers = developers;
  }

  public void setEmitterDirectory(final String emitterDirectory) {
    this.emitterDirectory = emitterDirectory;
  }

  public void setIcon(final String icon) {
    this.icon = icon;
  }

  public void setLogo(final String logo) {
    this.logo = logo;
  }

  public void setName(final String name) {
    this.name = name;
  }

  public void setRenderScale(final float renderScale) {
    this.renderScale = renderScale;
  }

  public void setSpritesDirectory(final String spritesDirectory) {
    this.spritesDirectory = spritesDirectory;
  }

  public void setSubTitle(final String subTitle) {
    this.subTitle = subTitle;
  }

  public void setVersion(final float version) {
    this.version = version;
  }

  @Override
  public String toString() {
    return this.getSubTitle() != null && !this.getSubTitle().isEmpty() ? this.getName() + " " + this.getVersion() + " - " + this.getSubTitle() : this.getName() + " " + this.getVersion();
  }
}

@@ -624,21 +624,22 @@
 private 
-float
+String
  version
@@ -769,16 +769,15 @@
 The 
-ultimate
+pure 2D
  jav
@@ -1007,12 +1007,14 @@
 n = 
+%22v
 1.0
-f
+%22
 ;%0D%0A%0D
@@ -2010,29 +2010,30 @@
 t%0D%0A  public 
-float
+String
  getVersion(
@@ -3062,21 +3062,22 @@
 n(final 
-float
+String
  version

Change the game version to be a string instead of a float value