switch(st.nextToken()) { case StreamTokenizer.TT_EOF: break scan; case StreamTokenizer.TT_EOL: break scan; case StreamTokenizer.TT_WORD:  String key = st.sval; if (key.equals("background")) { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  BACKGROUND = new Color(red,green,blue); } else if (key.equals("unitsize")) { st.nextToken(); unitSize = (int)st.nval; } else if (key.equals("heavywoods")) { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  HEAVY_WOODS = new Color(red,green,blue); } else { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  m_terrainColors[Terrain.parse(key)]=new Color(red,green,blue); }
switch(st.nextToken()) { case StreamTokenizer.TT_EOF: break scan; case StreamTokenizer.TT_EOL: break scan; case StreamTokenizer.TT_WORD:  String key = st.sval; if (key.equals("unitsize")) { st.nextToken(); unitSize = (int)st.nval; } else if (key.equals("background")) { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  BACKGROUND = new Color(red,green,blue); } else if (key.equals("heavywoods")) { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  HEAVY_WOODS = new Color(red,green,blue); } else { st.nextToken(); red = (int)st.nval; st.nextToken(); green = (int)st.nval; st.nextToken(); blue = (int)st.nval;  m_terrainColors[Terrain.parse(key)]=new Color(red,green,blue);
    private void initializeColors() {        int red;        int green;        int blue;        try {            File coloursFile = new File("data/hexes/" + Settings.minimapColours);            if(!coloursFile.exists()) {                return;            }            Reader cr = new FileReader(coloursFile);            StreamTokenizer st = new StreamTokenizer(cr);            st.lowerCaseMode(true);            st.quoteChar('"');            st.commentChar('#');scan:            while(true) {                // undefined colours will be black                red=0;                green=0;                blue=0;                switch(st.nextToken()) {                case StreamTokenizer.TT_EOF:                    break scan;                case StreamTokenizer.TT_EOL:                    break scan;                case StreamTokenizer.TT_WORD:                    // read in                     String key = st.sval;                    if (key.equals("background")) {                        st.nextToken();                        red = (int)st.nval;                        st.nextToken();                        green = (int)st.nval;                        st.nextToken();                        blue = (int)st.nval;                                                BACKGROUND = new Color(red,green,blue);                   } else if (key.equals("unitsize")) {                        st.nextToken();                        unitSize = (int)st.nval;                   } else if (key.equals("heavywoods")) {                        st.nextToken();                        red = (int)st.nval;                        st.nextToken();                        green = (int)st.nval;                        st.nextToken();                        blue = (int)st.nval;                                                HEAVY_WOODS = new Color(red,green,blue);                    } else {                        st.nextToken();                        red = (int)st.nval;                        st.nextToken();                        green = (int)st.nval;                        st.nextToken();                        blue = (int)st.nval;                                                m_terrainColors[Terrain.parse(key)]=new Color(red,green,blue);                   }                }            }            cr.close();        } catch(Exception e) {            System.err.println("error reading MiniMap colours file:");            System.err.println(e.getMessage());        }    }