Package fr.formiko.views.cli
Class CLIMap
java.lang.Object
fr.formiko.views.cli.CLIMap
Represent the Map in CLI mode.
CLI = Console Line Interface.
CLI = Console Line Interface.
- Author:
- Hydrolien
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the backgroud color of a Case.caseToString
(Case contenu, boolean caseNuageuse, boolean caseSombre) Return a Case as a String.caseToString
(CCase cc, Joueur j) Return a case as a String.private static String
Return a color String to represent the ally status of Creature c with the playingAnt.private String
Return the legend as a String.mapLineToString
(CCase cc, Joueur j) Return a line of a map as a String.Return the map as a String easy to use.Return the map as a String.static String
static String
objetSurCarteAIdToString
(ObjetSurCarteAId o, boolean colored) Return a String representing the ObjetSurCarteAId in param.void
setLookedCCase
(CCase cc) toString()
Main function of CLIMap.
-
Field Details
-
gc
-
legend
private static fr.formiko.usual.structures.listes.GString legend -
xi
private static int xi -
unseeableChar
private static int unseeableChar -
sizeCase
private int sizeCase -
lookedCCase
-
-
Constructor Details
-
CLIMap
Main contructor.- Parameters:
gc
- The GCase to print.
-
-
Method Details
-
getLookedCCase
-
setLookedCCase
-
toString
Main function of CLIMap.
If on linux it will use color for the map. -
getColorAllyStatus
Return a color String to represent the ally status of Creature c with the playingAnt. -
objetSurCarteAIdToString
Return a String representing the ObjetSurCarteAId in param.- Parameters:
o
- The Object to represent.
-
objetSurCarteAIdToString
-
legendToString
Return the legend as a String.
Legend can be empty or can have line that look like this "A : F1, 5, G12 \n B : 8, 3 etc." -
mapToMapString
Return the map as a String easy to use. -
mapToString
Return the map as a String.
All map infos are stored in a GCase, this.gc. -
mapLineToString
Return a line of a map as a String.- Parameters:
cc
- The 1a CCase of the line.
-
caseToString
Return a case as a String.
This string have a fix length.- Parameters:
cc
- CCase that contain Case to print.j
- Player that will be used to know if cases need to be nuageuse or sombre.
-
caseToString
Return a Case as a String.
This string have a fix length.- Parameters:
contenu
- Case to print.caseNuageuse
- Boolean to know if player have explored the Case.caseSombre
- Boolean to know if player is curently seeing the Case.
-
caseColor
Return the backgroud color of a Case.- Parameters:
c
- Case to print.
-