📄 utils.java
字号:
/*
* Copyright (C) 2005-2006 Leopardo.f
*
* This file is part of M-SuDoKu, a J2ME version of SuDoKu.
*
* M-SuDoKu is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* M-SuDoKu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with M-SuDoKu; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. Or, visit http://www.gnu.org/copyleft/gpl.html
*/
package MSuDoKu;
/**
* This class provides help with string constants and
* multilanguage support (only English, Italian, Spanish and German at
* the time being)
*
* @author Leopardo.f
*/
public class Utils {
public static final String sAppName = "M-SuDoKu";
public static final String sVersion = "v0.9.0";
public static final String sSite = "http://phonphun.altervista.org";
public static final String[] saITA = {"Menu", "Aiuto", "Livello", "Sfondo", "Info", "Metodo di input", "Ricomincia", "Mostra soluzione", "Salta questa griglia", "Salva ed esci", "Annulla", "OK"};
public static final String[] saENG = {"Menu", "Help", "Level", "Background", "About", "Input mode", "Restart", "Show solution", "Skip this grid", "Save and exit", "Cancel", "Select"};
public static final String[] saES = {"Menu", "Help", "Level", "Background", "About", "Input mode", "Restart", "Show solution", "Skip this grid", "Save and exit", "Cancel", "Select"};
public static final String[] saDE = {"Menu", "Help", "Level", "Background", "About", "Input mode", "Restart", "Show solution", "Skip this grid", "Save and exit", "Cancel", "Select"};
public static final int MENU = 0;
public static final int HELP = 1;
public static final int LEVEL = 2;
public static final int BACKGROUND = 3;
public static final int ABOUT = 4;
public static final int INPUT = 5;
public static final int RESTART = 6;
public static final int SOLUTION = 7;
public static final int SKIP = 8;
public static final int EXIT = 9;
public static final int CANCEL = 10;
public static final int SELECT = 11;
public static final String[] saLevelITA = {"Difficile", "Medio"};
public static final String[] saLevelENG = {"Difficult", "Medium"};
public static final String[] saLevelES = {"Dif韈il", "Medio"};
public static final String[] saLevelDE = {"Schwierig", "Mittel"};
public static final String[] saInputITA = {"Tasti numerici", "Senza tasti num.", "Tasti num. + joypad"};
public static final String[] saInputENG = {"With numpad", "Without numpad", "Numpad+Joypad"};
public static final String[] saInputES = {"Con N鷐eros", "Sin N鷐eros", "N鷐eros+Joypad"};
public static final String[] saInputDE = {"Ziffernfeld", "Ohne Ziffernfeld", "Ziffern+Joypad"};
public static final String[] saTimeITA = {"ora/e", "minuti", "secondi"};
public static final String[] saTimeENG = {"hour(s)", "minute(s)", "second(s)"};
public static final String[] saTimeES = {"hour(s)", "minute(s)", "second(s)"};
public static final String[] saTimeDE = {"Stunde(n)", "Minute(n)", "Sekunde(n)"};
public static final String HelpITA = "Scopo del gioco \uFFFDriempire tutta la griglia 9x9, " +
"ponendo in ogni casella vuota un numero da 1 a 9 in modo che tale numero " +
"compaia una sola volta nella riga, nella colonna e nel quadrato 3x3 cui " +
"appartiene la casella. Ogni griglia presenta inizialmente un certo numero di " +
"caselle gi\uFFFDriempite, che servono da aiuto nell\'inserimento dei numeri successivi.\n" +
"Per giocare, muovi il cursore usando il joypad (o, a seconda del modello, " +
"i tasti numerici), quindi premi il pulsante di fuoco (o il tasto 5) ed usa i tasti " +
"numerici per inserire o sovrascrivere un numero nella casella selezionata (il tasto 0 " +
"cancella un numero gi\uFFFDinserito).\n" +
"In alternativa, se il dispositivo non ha una tastiera numerica (o semplicemente se " +
"vi risulta pi\uFFFDcomodo!) potete usare il menu per cambiare la modalit\uFFFDdi input, in " +
"modo che i numeri possano essere inseriti nelle celle muovendo il joypad in su o in gi\uFFFD\n" +
"Esiste infine una terza modalit\uFFFDdi input che permette di usare il joypad per spostare il cursore " +
"ed i tasti numerici per scrivere direttamente i numeri.\n" +
"Inoltre, il menu del gioco permette di scegliere il livello di difficolt\uFFFD(tra Medio " +
"e Difficile), lo sfondo della griglia, di mostrare la soluzione, di ricominciare " +
"il gioco e di uscire salvando la griglia corrente.";
public static final String HelpENG = "The aim of the puzzle is to enter a numeral " +
"from 1 through 9 in each cell of the grid (made up of 3\uFFFD subgrids called regions), " +
"starting with the numerals given in some cells.\n" +
"Each row, column and region must contain only one instance of each numeral.\n" +
"To play, move the cursor using joypad (or, depending on your device model, " +
"numeric keys), press the fire button (or 5 key) and use numeric keys " +
"to enter or overwrite a number in the selected cell (0 key deletes a previously entered " +
"number).\n" +
"Alternatively, if your device does not have a numeric keypad (or simply if you " +
"feel more comfortable this way!) you can use the menu to change the input mode, so " +
"that you can enter a number in a cell by repeatedly pushing the joypad up or down.\n" +
"Finally, a third input mode is available, which allows you to use the joypad to move the " +
"cursor and the numpad to type numbers directly into the selected cell.\n" +
"The game menu allows you to choose the difficulty level (either Medium " +
"or Difficult), the grid background, to show the solution of the current grid, to " +
"restart the game and to exit (saving the current grid).";
public static final String HelpES = "El objetivo de este juego es completar el tablero con " +
"n鷐eros del 1 al 9. No se puede repetir ninguna cifra en ninguna fila o columna. " +
"Tampoco se puede repetir en los cuadrados peque駉s (de 3x3).\n" +
"Para jugar, mueve el cursor usando el joystick o lo que tenga tu tel閒ono. Pulsa el " +
"bot髇 de acci髇 (o el 5) y usa los n鷐eros para introducir los n鷐eros.\n" +
"Opcionalmente, si tu m髒il no tiene teclado num閞ico (o consideras inc髆oda la " +
"manera predeterminada del teclado) puedes usar el men\uFFFDpara cambiar el Tipo de Teclado, " +
"para ello tendr醩 que poner los n鷐eros girando el joystick arriba-abajo o " +
"derecha-izquierda para llegar al n鷐ero.\n" +
"El men\uFFFDdel juego te permite elegir el nivel de dificultad (Medio o Dif韈il), el fondo " +
"del tablero, Reiniciar el juego y Salir (Salvando la partida).";
public static final String HelpDE = "Das Ziel dieses Puzzles ist es, die Zahlen 1 bis 9 jeweils 9 mal " +
"auf das Gitter zu verteilen. Dabei besteht das Gitter aus 81 Feldern, die man in 9 Spalten, " +
"9 Zeilen und 9 Bl鯿ken der Gr鲞e 3x3 einteilt. In jeder Spalte, jeder Zeile und jedem Block " +
"darf jede Ziffer nur einmal vorkommen. Es gibt eine eindeutige L鰏ung.\n" +
"Um Zahlen einzugeben, bewegen Sie mit den Zifferntasten oder dem Joypad den Cursor zum " +
"gew黱schten Feld, dr點ken die Feuer-Taste (oder 5) und geben dann eine Ziffer ein. Wenn " +
"Sie 0 eingeben, wird das Feld wieder gel鰏cht.\n" +
"Wenn Ihr Ger鋞 keine Zifferntastatur besitzt, k鰊nen Sie im Men\uFFFDdie Eingabemethode " +
"umschalten, so dass Zahlen eingegeben werden k鰊nen, indem Sie wiederholt " +
"die Auf- und Ab-Taste dr點ken.\n" +
"Je nach Schwierigkeitsgrad ist eine Anzahl von Ziffern bereits vorgegeben. Diese sind " +
"fett gedruckt und k鰊nen nicht gel鰏cht werden.\n" +
"Mit \"Ziffern+Joypad\" k鰊nen Sie den Cursor mit dem Joypad bewegen und die " +
"Zahlen direkt mit der Zifferntastatur eingeben.\n" +
"Das Programm speichert beim Beenden das aktuelle Gitter automatisch und ruft es beim " +
"n鋍hsten Start wieder auf.";
public static final String AboutITA = sAppName + " " + sVersion + " (C) 2005 leopardo.f\n" +
"Per ulteriori informazioni, download del codice sorgente e nuove versioni del gioco visita:\n" +
sSite + "\n\n" +
"M-SuDoKu \uFFFDSoftware Libero ed \uFFFDdistribuito sotto licenza GPL, versione 2 o superiore " +
"(http://www.gnu.org/copyleft/gpl.html).\n" +
"Il programma \uFFFDdistribuito \"COS\uFFFDCOM'\", senza alcun tipo di garanzia, n\uFFFDimplicita n\uFFFDesplicita.";
public static final String AboutENG = sAppName + " " + sVersion + " (C) 2005 leopardo.f\n" +
"For further info, source code download and game updates please visit:\n" +
sSite + "\n\n" +
"M-SuDoKu is free software and is distributed under GPL version 2 or higher " +
"(http://www.gnu.org/copyleft/gpl.html).\n" +
"The program is provided \"AS IS\" without any warranty of any kind, either expressed or implied.";
public static final String AboutES = sAppName + " " + sVersion + " (C) 2005 leopardo.f\n" +
"Traducido por Rodrigo Fdez.[Sobrescobio.com]\n" +
"Para m醩 informaci髇, source code download y actualizaciones visita:\n" +
sSite + "\n\n" +
"M-SuDoKu es un programa gratu韙o y distribu韉o bajo una licencia GPL v.2 o superior " +
"(http://www.gnu.org/copyleft/gpl.html).\n" +
"El programa est\uFFFDproporcionado \"TAL CUAL\" sin ning鷑 tipo de garant韆, expresa o condici髇.";
public static final String AboutDE = sAppName + " " + sVersion + " (C) 2005 leopardo.f\n" +
"躡ersetzung von Christoph Glotzbach.\n" +
"Weitere Informationen, den Quellcode des Spiels und Updates finden Sie unter:\n" +
sSite + "\n\n" +
"M-SuDoKu is Freie Software und wird kostenlos vertrieben unter der GPL v2 oder h鰄er " +
"(siehe http://www.gnu.org/copyleft/gpl.html).\n" +
"Das Programm wird \"SO WIE ES IST\" zur Verf黦ung gestellt, ohne irgendwelchen expliziten oder " +
"oder impliziten Garantien oder Gew鋒rleistungen. Betrieb auf eigene Gefahr.";
public static final String CongratsITA = "CONGRATULAZIONI!!!\n" +
"Puzzle risolto!!!\nTempo: ";
public static final String CongratsENG = "CONGRATULATIONS!!!\n" +
"Puzzle solved!!!\nTime: ";
public static final String CongratsES = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -