Coverage Summary for Class: ImageEnum (it.polimi.ingsw.view.GUI)

Class Class, % Method, % Line, %
ImageEnum 0% (0/ 1) 0% (0/ 4) 0% (0/ 55)


1 package it.polimi.ingsw.view.GUI; 2  3 enum ImageEnum { 4  APOLLO_PlAYER("GraphicSrc/Player/Apollo.png","APOLLO_PLAYER"), 5  ARTEMIS_PLAYER("GraphicSrc/Player/Artemis.png","ARTEMIS_PLAYER"), 6  ATHENA_PLAYER("GraphicSrc/Player/Athena.png","ATHENA_PLAYER"), 7  ATLAS_PlAYER("GraphicSrc/Player/Atlas.png","ATLAS_PLAYER"), 8  DEMETER_PlAYER("GraphicSrc/Player/Demeter.png","DEMETER_PLAYER"), 9  HEPHAESTUS_PlAYER("GraphicSrc/Player/Hephaestus.png","HEPHAESTUS_PLAYER"), 10  HERA_PlAYER("GraphicSrc/Player/Hera.png","HERA_PLAYER"), 11  MEDUSA_PlAYER("GraphicSrc/Player/Medusa.png","MEDUSA_PLAYER"), 12  MINOTAUR_PlAYER("GraphicSrc/Player/Minotaur.png","MINOTAUR_PLAYER"), 13  PAN_PlAYER("GraphicSrc/Player/Pan.png","PAN_PLAYER"), 14  TRITON_PlAYER("GraphicSrc/Player/Triton.png","TRITON_PLAYER"), 15  POSEIDON_PlAYER("GraphicSrc/Player/Poseidon.png","POSEIDON_PLAYER"), 16  PROMETHEUS_PlAYER("GraphicSrc/Player/Prometheus.png","PROMETHEUS_PLAYER"), 17  ZEUS_PlAYER("GraphicSrc/Player/Zeus.png","ZEUS_PLAYER"), 18  APOLLO_DEF("GraphicSrc/Gods/Apollo.jpg","APOLLO_DEF"), 19  ARTEMIS_DEF("GraphicSrc/Gods/Artemis.jpg","ARTEMIS_DEF"), 20  ATHENA_DEF("GraphicSrc/Gods/Athena.jpg","ATHENA_DEF"), 21  ATLAS_DEF("GraphicSrc/Gods/Atlas.jpg","ATLAS_DEF"), 22  DEMETER_DEF("GraphicSrc/Gods/Demeter.jpg","DEMETER_DEF"), 23  HEPHAESTUS_DEF("GraphicSrc/Gods/Hephaestus.jpg","HEPHAESTUS_DEF"), 24  HERA_DEF("GraphicSrc/Gods/Hera.jpg","HERA_DEF"), 25  MEDUSA_DEF("GraphicSrc/Gods/Medusa.jpg","MEDUSA_DEF"), 26  MINOTAUR_DEF("GraphicSrc/Gods/Minotaur.jpg","MINOTAUR_DEF"), 27  PAN_DEF("GraphicSrc/Gods/Pan.jpg","PAN_DEF"), 28  TRITON_DEF("GraphicSrc/Gods/Triton.jpg","TRITON_DEF"), 29  POSEIDON_DEF("GraphicSrc/Gods/Poseidon.jpg","POSEIDON_DEF"), 30  PROMETHEUS_DEF("GraphicSrc/Gods/Prometheus.jpg","PROMETHEUS_DEF"), 31  ZEUS_DEF("GraphicSrc/Gods/Zeus.jpg","ZEUS_DEF"), 32  PODIUM("GraphicSrc/Player/podium.png","PODIUM"), 33  PODIUM_GOLD("GraphicSrc/Player/podium_gold.png","PODIUM_GOLD"), 34  CLOUD("GraphicSrc/clouds.png","CLOUD"), 35  LEVEL1("GraphicSrc/Buildings/level1.png","LEVEL1"), 36  LEVEL2("GraphicSrc/Buildings/level2.png","LEVEL2"), 37  LEVEL3("GraphicSrc/Buildings/level3.png","LEVEL3"), 38  DOME("GraphicSrc/Buildings/dome.png","DOME"), 39  BLUE("GraphicSrc/Buildings/BLUE.png","BLUE"), 40  BROWN("GraphicSrc/Buildings/BROWN.png","BROWN"), 41  WHITE("GraphicSrc/Buildings/WHITE.png","WHITE"), 42  BUILD("GraphicSrc/ExtraAssets/BUILD.gif","BUILD"), 43  MOVE("GraphicSrc/ExtraAssets/MOVE.gif","MOVE"), 44  BUILD_DOME("GraphicSrc/ExtraAssets/BuildDome.gif","BUILD_DOME"), 45  END("GraphicSrc/ExtraAssets/EndTurn.gif","END_TURN"), 46  WIN("GraphicSrc/WIN.gif","WIN"), 47  LOSE("GraphicSrc/LOSE.gif","LOSE"), 48  SELECT_GOD("GraphicSrc/SelectGods.png","SELECT_GOD"), 49  CHOOSE_START_PLAYER("GraphicSrc/ChooseStartPlayer.png","START_PLAYER") 50  ; 51  52  53  private String url; 54  private String name; 55  56  private ImageEnum(String url, String name) { 57  this.url=url; 58  this.name=name; 59  } 60  61  /** 62  * Get image's urls 63  * @param name image's name 64  * @return image's urls 65  */ 66  public static String getUrl(String name){ 67  for(ImageEnum i:ImageEnum.values()){ 68  if(i.name.equals(name)){ 69  return i.url; 70  } 71  } 72  return null; 73  } 74 }