// Path: core/src/com/galvarez/ttw/utils/Assets.java
// public final class Assets implements Disposable {
// 
//     public static final String FONTS_ROMANICA_TTF = "fonts/Romanica.ttf";
//     public static final String UISKIN_JSON = "uiskin/uiskin.json";
//     private final Skin skin;
// 
//     public enum Icon {
//         DISCOVERY("discovery-bulb"),
//         DIPLOMACY("diplomacy-handshake"),
//         BUILDINGS("buildings-hammer"),
//         REVOLT("revolt-clenched-fist"),
//         FLAG("finish-flag"),
//         MILITARY("military-swords"),
//         DISEASE("disease-skull"),
//         END_TURN("empty-hourglass");
// 
//         private final String name;
// 
//         Icon(String name) {
//             this.name = name;
//         }
//     }
// 
//     private final AssetManager manager;
// 
//     private final EnumMap<Icon, Drawable> drawables = new EnumMap<>(Icon.class);
// 
//     private final EnumMap<Icon, TextureRegion> regions = new EnumMap<>(Icon.class);
// 
//     private final Map<String, BitmapFont> fonts = new HashMap<>();
// 
//     public Assets() {
//         manager = loadAssets();
// 
//         ObjectMap<String, Object> fonts = new ObjectMap<>();
//         fonts.put("default-font", getFont(16));
//         fonts.put("colored-font", getFont(16, true));
//         manager.load(UISKIN_JSON, Skin.class, new SkinLoader.SkinParameter(fonts));
//         manager.finishLoading();
//         skin = manager.get(UISKIN_JSON);
// 
//         for (Icon icon : Icon.values())
//             addIcon(icon, icon.name);
//     }
// 
//     private static AssetManager loadAssets() {
//         AssetManager manager = new AssetManager();
//         manager.finishLoading();
//         return manager;
//     }
// 
// 
//     private void addIcon(Icon type, String name) {
//         drawables.put(type, skin.getDrawable(name));
//         regions.put(type, skin.getRegion(name));
//     }
// 
//     public BitmapFont getFont(int size) {
//         return getFont(size, false);
//     }
// 
//     public BitmapFont getFont(int size, boolean markupEnabled) {
//         String key = "romanica-" + size + "-" + markupEnabled;
//         synchronized (fonts) {
//             BitmapFont font = fonts.get(key);
//             if (font == null) {
//                 fonts.put(key, font = createFont(size, markupEnabled));
//             }
//             return font;
//         }
//     }
// 
//     private static BitmapFont createFont(int size, boolean markupEnabled) {
//         FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/romanica.ttf"));
//         FreeTypeFontParameter parameter = new FreeTypeFontParameter();
//         try {
//             parameter.size = size;
//             BitmapFont font = generator.generateFont(parameter);
//             font.getData().markupEnabled = markupEnabled;
//             return font;
//         } finally {
//             generator.dispose(); // don't forget to dispose to avoid memory leaks!
//         }
//     }
// 
//     public Drawable getDrawable(Icon type) {
//         return drawables.get(type);
//     }
// 
//     public TextureRegion getTexture(Icon type) {
//         return regions.get(type);
//     }
// 
//     public Skin getSkin() {
//         return skin;
//     }
// 
// 
//     @Override
//     public void dispose() {
//         manager.dispose();
//     }
// }


import com.artemis.annotations.Wire;
import com.artemis.systems.VoidEntitySystem;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.galvarez.ttw.utils.Assets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import static java.lang.String.format;
package com.galvarez.ttw.rendering;




/**
 * Store notifications until processed.
 * 
 * @author Guillaume Alvarez
 */
@Wire
public final class NotificationsSystem extends VoidEntitySystem {

  private static final Comparator<Notification> INFO_FIRST = new Comparator<Notification>() {
    @Override
    public int compare(Notification o1, Notification o2) {
      if (o1.requiresAction()) {
        if (o2.requiresAction())
          return o1.msg.compareTo(o2.msg);
        else
          return 1;
      } else {
        if (o2.requiresAction()) return -1;
        else
          return o1.msg.compareTo(o2.msg);
      }
    }
  };

  /** Notifications registered for next turn. */
  private final List<Notification> notifications = new ArrayList<>();

  /** Notifications for current turn. */
  private final List<Notification> current = new ArrayList<>();

// Path: core/src/com/galvarez/ttw/utils/Assets.java
// public final class Assets implements Disposable {
// 
//     public static final String FONTS_ROMANICA_TTF = "fonts/Romanica.ttf";
//     public static final String UISKIN_JSON = "uiskin/uiskin.json";
//     private final Skin skin;
// 
//     public enum Icon {
//         DISCOVERY("discovery-bulb"),
//         DIPLOMACY("diplomacy-handshake"),
//         BUILDINGS("buildings-hammer"),
//         REVOLT("revolt-clenched-fist"),
//         FLAG("finish-flag"),
//         MILITARY("military-swords"),
//         DISEASE("disease-skull"),
//         END_TURN("empty-hourglass");
// 
//         private final String name;
// 
//         Icon(String name) {
//             this.name = name;
//         }
//     }
// 
//     private final AssetManager manager;
// 
//     private final EnumMap<Icon, Drawable> drawables = new EnumMap<>(Icon.class);
// 
//     private final EnumMap<Icon, TextureRegion> regions = new EnumMap<>(Icon.class);
// 
//     private final Map<String, BitmapFont> fonts = new HashMap<>();
// 
//     public Assets() {
//         manager = loadAssets();
// 
//         ObjectMap<String, Object> fonts = new ObjectMap<>();
//         fonts.put("default-font", getFont(16));
//         fonts.put("colored-font", getFont(16, true));
//         manager.load(UISKIN_JSON, Skin.class, new SkinLoader.SkinParameter(fonts));
//         manager.finishLoading();
//         skin = manager.get(UISKIN_JSON);
// 
//         for (Icon icon : Icon.values())
//             addIcon(icon, icon.name);
//     }
// 
//     private static AssetManager loadAssets() {
//         AssetManager manager = new AssetManager();
//         manager.finishLoading();
//         return manager;
//     }
// 
// 
//     private void addIcon(Icon type, String name) {
//         drawables.put(type, skin.getDrawable(name));
//         regions.put(type, skin.getRegion(name));
//     }
// 
//     public BitmapFont getFont(int size) {
//         return getFont(size, false);
//     }
// 
//     public BitmapFont getFont(int size, boolean markupEnabled) {
//         String key = "romanica-" + size + "-" + markupEnabled;
//         synchronized (fonts) {
//             BitmapFont font = fonts.get(key);
//             if (font == null) {
//                 fonts.put(key, font = createFont(size, markupEnabled));
//             }
//             return font;
//         }
//     }
// 
//     private static BitmapFont createFont(int size, boolean markupEnabled) {
//         FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/romanica.ttf"));
//         FreeTypeFontParameter parameter = new FreeTypeFontParameter();
//         try {
//             parameter.size = size;
//             BitmapFont font = generator.generateFont(parameter);
//             font.getData().markupEnabled = markupEnabled;
//             return font;
//         } finally {
//             generator.dispose(); // don't forget to dispose to avoid memory leaks!
//         }
//     }
// 
//     public Drawable getDrawable(Icon type) {
//         return drawables.get(type);
//     }
// 
//     public TextureRegion getTexture(Icon type) {
//         return regions.get(type);
//     }
// 
//     public Skin getSkin() {
//         return skin;
//     }
// 
// 
//     @Override
//     public void dispose() {
//         manager.dispose();
//     }
// }


// Path: core/src/com/galvarez/ttw/rendering/NotificationsSystem.java
import com.artemis.annotations.Wire;
import com.artemis.systems.VoidEntitySystem;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.galvarez.ttw.utils.Assets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import static java.lang.String.format;

package com.galvarez.ttw.rendering;




/**
 * Store notifications until processed.
 * 
 * @author Guillaume Alvarez
 */
@Wire
public final class NotificationsSystem extends VoidEntitySystem {

  private static final Comparator<Notification> INFO_FIRST = new Comparator<Notification>() {
    @Override
    public int compare(Notification o1, Notification o2) {
      if (o1.requiresAction()) {
        if (o2.requiresAction())
          return o1.msg.compareTo(o2.msg);
        else
          return 1;
      } else {
        if (o2.requiresAction()) return -1;
        else
          return o1.msg.compareTo(o2.msg);
      }
    }
  };

  /** Notifications registered for next turn. */
  private final List<Notification> notifications = new ArrayList<>();

  /** Notifications for current turn. */
  private final List<Notification> current = new ArrayList<>();

  private final Assets icons;