Class Main

java.lang.Object
fr.formiko.formiko.Main

public class Main extends Object
Launch class.
Main file have all the shortcut on getter or setter that are curently used
Author:
Hydrolien
  • Field Details

    • op

      private static Options op
      Use only after iniOp().
    • tempOp

      private static Options tempOp
      Use only before iniOp() to avoid nullPointerException.
    • data

      private static Data data
      Data use by GUI
    • view

      private static View view
      View use everywere to update user interface
    • ch

      private static fr.formiko.usual.Chrono ch
    • lon

      private static long lon
    • lonTotal

      private static long lonTotal
    • tempsDeDébutDeJeu

      private static long tempsDeDébutDeJeu
    • pa

      private static Partie pa
    • niveauDeDétailDeLAffichage

      private static byte niveauDeDétailDeLAffichage
    • pi

      private static fr.formiko.usual.images.Pixel pi
    • key

      private static HashMap<String,Integer> key
    • avancementChargement

      private static int avancementChargement
    • tem

      private static fr.formiko.usual.Time tem
    • retournerAuMenu

      private static boolean retournerAuMenu
    • tuto

      private static boolean tuto
    • ths

      private static ThScript ths
    • modeCLI

      private static boolean modeCLI
    • cptMessageChargement

      private static int cptMessageChargement
    • mp

      private static fr.formiko.usual.media.audio.MusicPlayer mp
    • needToInitialize

      private static boolean needToInitialize
    • openMenuFirst

      private static boolean openMenuFirst
    • wantToQuit

      private static boolean wantToQuit
    • launchFromLauncher

      private static boolean launchFromLauncher
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String[] args)
      Lauch the game.
      It can have some args to do special thing.
      -d - set on the debug mode.
      trad make sur that every language file is 100% translated. It can auto translate some texte if the python file and translation api are on the same folder.
      op save the Options.txt file
      Others args are not fuly usable for now.
      Parameters:
      args - [] It can contain -d, trad, son, op, test, supprimer
    • iniLaunch

      public static void iniLaunch()
      pre launch.
    • launch

      public static boolean launch()
      Launch in the void main if there is not other args than -something (ex : -d).
    • isCLI

      public static boolean isCLI()
    • getNiveauDeDétailDeLAffichage

      public static byte getNiveauDeDétailDeLAffichage()
    • getEspece

      public static Espece getEspece()
    • getEspeceById

      public static Espece getEspeceById(int id)
    • getGEspece

      public static GEspece getGEspece()
    • getJoueurById

      public static Joueur getJoueurById(int id)
    • getFourmiliereById

      public static Fourmiliere getFourmiliereById(int id)
    • getF

      public static FFrame getF()
    • getOp

      public static Options getOp()
    • saveOp

      public static void saveOp(boolean threaded)
    • getCh

      public static fr.formiko.usual.Chrono getCh()
    • getKey

      public static int getKey(String clé)
    • getPartie

      public static Partie getPartie()
    • setPartie

      public static void setPartie(Partie p)
    • getPiFond

      public static fr.formiko.usual.images.Pixel getPiFond()
    • getAvancementChargement

      public static int getAvancementChargement()
    • setAvancementChargement

      public static void setAvancementChargement(int x)
    • getTime

      public static fr.formiko.usual.Time getTime()
    • getRetournerAuMenu

      public static boolean getRetournerAuMenu()
    • setRetournerAuMenu

      public static void setRetournerAuMenu(boolean b)
    • getOs

      public static fr.formiko.usual.Os getOs()
    • setOs

      public static void setOs(fr.formiko.usual.Os o)
    • getFolder

      public static FFolder getFolder()
    • setFolder

      public static void setFolder(FFolder f)
    • setTuto

      public static void setTuto(boolean b)
    • getFirstGame

      public static boolean getFirstGame()
    • setFirstGame

      public static void setFirstGame(boolean b)
    • getData

      public static Data getData()
    • setData

      public static void setData(Data d)
    • getView

      public static View getView()
    • setView

      public static void setView(View v)
    • setModeCLI

      public static void setModeCLI(boolean b)
    • getLonTotal

      public static long getLonTotal()
    • getMp

      public static fr.formiko.usual.media.audio.MusicPlayer getMp()
    • getPlayingAnt

      public static Fourmi getPlayingAnt()
    • setPlayingAnt

      public static void setPlayingAnt(Fourmi f)
    • getPlayingJoueur

      public static Joueur getPlayingJoueur()
    • getActionGameOn

      public static boolean getActionGameOn()
    • estWindows

      public static boolean estWindows()
    • get

      public static String get(String clé)
    • getScript

      public static Script getScript()
    • getThScript

      public static ThScript getThScript()
    • setScript

      public static void setScript(ThScript t)
    • launchScript

      public static void launchScript()
    • stopScript

      public static void stopScript()
    • repaint

      public static void repaint()
    • doAction

      public static void doAction(int x)
    • getDimX

      public static int getDimX()
    • getDimY

      public static int getDimY()
    • getWidth

      public static int getWidth()
    • getHeight

      public static int getHeight()
    • getTailleElementGraphique

      public static int getTailleElementGraphique(int x)
    • getTailleElementGraphiqueX

      public static int getTailleElementGraphiqueX(int x)
    • getTailleElementGraphiqueY

      public static int getTailleElementGraphiqueY(int x)
    • getRacioEspaceLibre

      public static double getRacioEspaceLibre()
    • getDimXCarte

      public static int getDimXCarte()
    • getLanguage

      public static byte getLanguage()
    • setLanguage

      public static void setLanguage(int x)
    • getbuttonSizeZoom

      public static int getbuttonSizeZoom()
    • getbuttonSizeAction

      public static int getbuttonSizeAction()
    • getbuttonSizeTX

      public static int getbuttonSizeTX()
    • getMaxMessageDisplay

      public static int getMaxMessageDisplay()
    • getDrawGrid

      public static boolean getDrawGrid()
    • getOrientedObjectOnMap

      public static boolean getOrientedObjectOnMap()
    • getForceQuit

      public static boolean getForceQuit()
    • getBorderButtonSize

      public static byte getBorderButtonSize()
    • getDrawRelationsIcons

      public static boolean getDrawRelationsIcons()
    • getFont1

      public static Font getFont1()
    • getFont1

      public static Font getFont1(double d)
    • setFont1

      public static void setFont1(Font f)
    • getFont2

      public static Font getFont2()
    • setFont2

      public static void setFont2(Font f)
    • getFontSizeText

      public static int getFontSizeText()
    • getFontSizeTitle

      public static int getFontSizeTitle()
    • getFullscreen

      public static boolean getFullscreen()
    • getLoadingDuringMenus

      public static boolean getLoadingDuringMenus()
    • getKeepFilesRotated

      public static boolean getKeepFilesRotated()
    • getSizeOfMapLines

      public static int getSizeOfMapLines()
    • getPositionCase

      public static int getPositionCase()
    • getRealisticSize

      public static byte getRealisticSize()
    • getGi

      public static GInsecte getGi()
    • getListeJoueur

      public static GJoueur getListeJoueur()
    • getGj

      public static GJoueur getGj()
    • getGc

      public static GCase getGc()
    • getCCase

      public static CCase getCCase(int x, int y)
    • setNbrDeTour

      public static void setNbrDeTour(int x)
    • setTour

      public static void setTour(int x)
    • getNbrDeTour

      public static int getNbrDeTour()
    • getTour

      public static int getTour()
    • getDifficulté

      public static byte getDifficulté()
    • setDifficulté

      public static void setDifficulté(byte x)
    • setDifficulté

      public static void setDifficulté(int x)
    • getDateDeCréation

      public static LocalDateTime getDateDeCréation()
    • getAvaibleSpecies

      public static int[] getAvaibleSpecies()
    • getNbrDeJoueur

      public static int getNbrDeJoueur()
    • getMap

      public static Carte getMap()
    • getCarte

      public static Carte getCarte()
    • getVitesseDeJeu

      public static double getVitesseDeJeu()
    • getGe

      public static GEspece getGe()
    • getOpenMenuFirst

      public static boolean getOpenMenuFirst()
    • dontOpenMenuFirst

      public static void dontOpenMenuFirst()
    • isLaunchFromLauncher

      public static boolean isLaunchFromLauncher()
    • setLaunchFromLauncher

      public static void setLaunchFromLauncher(boolean launchFromLauncher)
      Update the boolean & every value that depend of it.
    • initialisation

      public static void initialisation()
      Initializes Options, key, language, time data, musique, os value. And check the integrity of the file tree.
    • ini

      public static void ini()
    • iniCpt

      public static void iniCpt()
      Initializes counter cpt of IEspece, Joueur, Fourmiliere ,ObjetAId.
    • iniOp

      public static void iniOp()
      Load Options.
    • iniLangue

      public static void iniLangue()
      Load language.
      If language are not fully translated, it will add data of default language.
    • setMessageChargement

      public static void setMessageChargement(String key)
      Print on the window a message about game loading.
      If you tried to use it before the creating of a new FPanelChargement, message will not appear on the window.
    • startCh

      public static void startCh()
    • endCh

      public static int endCh(String s)
      End the Chrono & return the time.
    • startCh

      public static void startCh(fr.formiko.usual.Chrono chTemp)
    • endCh

      public static int endCh(String s, fr.formiko.usual.Chrono chTemp)
      End the Chrono & return the time.
    • quit

      public static void quit(int exitCode)
      Try to exit normally.
      Save score informations.
      Clear temporary Images.
      Save time played.
      Stop java with code 0.
      If something went wrong stop java with code 1.
      Parameters:
      exitCode - the exit code used.
    • quit

      public static void quit()
    • quitter

      public static void quitter()
    • handleQuit

      public static void handleQuit()
      Launch normal exit on shutDown. From ctr-c for exemple.
    • tour

      public static void tour()
      Play a turn.
      1a updating Case resources.
      2a Make humain player and AI play.
      3a Make Insecte play.
      4a Add new Insectes.