-- Changelog --
-
-- Esperanto translations for Sudokuki 1.1 (from Sylvain Vedrenne)
-- German translations for Sudokuki 1.1 from Claus Poerschke
+- Fixed issue where "ENTER" doesn't close language dialog, and minor sync issue
+- Portuguese and russian translations for Sudokuki 1.1 (by Dmitry Salnikov)
+- Esperanto translations for Sudokuki 1.1 (by Sylvain Vedrenne)
+- German translations for Sudokuki 1.1 ( byClaus Poerschke)
* 2012-02-11 - released Sudokuki 1.1.Beta11
- Fixed #3485100 Cancelling 4 grids generation doesn't have expected effect
catalog = null;\r
}\r
}\r
- System.out.println("I18n using locale: " + currentLocale);\r
}\r
}\r
\r
}
public void notifyEnterCustomGridMode() {
-// System.out.println("GridController.notifyEnterCustomGridMode()");
model.enterCustomGridMode();
}
private int lastCO = 4;
public void notifyFocusPositionChanged(int li, int co) {
- System.out.println("GridController.notifyGridPositionChanged() li:"
- + li + " co:" + co);
lastLI = li;
lastCO = co;
}
gridGenerate(final int seed, final int requestedRatingMin, final int requestedRatingMax, final int[] grid, final int[] rating,\r
final int[] grid_with_clues) {\r
\r
- // System.out.println("SuexgJava.grid_generate()");\r
-\r
/*\r
* boolean values used to simulate the infamous goto used in the\r
* original C suexg algorithm\r
for (y = 1; y <= 9; y++) {\r
for (s = 1; s <= 9; s++) {\r
r++;\r
- // System.out.println("r : " + r);\r
Cols[r] = 4;\r
Col[r][1] = x * 9 - 9 + y;\r
- // System.out.println("Col[" + r + "][1] : " + Col[r][1]);\r
Col[r][2] = (B[x * 9 - 9 + y] - 48) * 9 - 9 + s + 81;\r
- // System.out.println("(B[" + (x * 9 - 9 + y) + "]-48)*9-9+"\r
- // + s + "+81");\r
- // System.out.println("Col[" + r + "][2] : " + Col[r][2]);\r
Col[r][3] = x * 9 - 9 + s + 81 * 2;\r
- // System.out.println("Col[" + r + "][3] : " + Col[r][3]);\r
Col[r][4] = y * 9 - 9 + s + 81 * 3;\r
- // System.out.println("Col[" + r + "][4] : " + Col[r][4]);\r
-\r
}\r
}\r
}\r
Rows[c] = 0;\r
}\r
for (r = 1; r <= n; r++) {\r
- // System.out.println("r : " + r);\r
for (c = 1; c <= Cols[r]; c++) {\r
a = Col[r][c];\r
- // System.out.println("a:" + a);\r
Rows[a]++;\r
Row[a][Rows[a]] = r;\r
}\r
while (true) {\r
// m0s:\r
if (gotoM0S) {\r
- // System.out.println("m0s");\r
gotoM0S = false;\r
sam1++;\r
if (sam1 > samples) {\r
- // printf(".\n");\r
return 0;\r
} else {\r
gotoM0 = true;\r
\r
// m0:\r
if (gotoM0) {\r
- // System.out.println("m0");\r
gotoM0 = false;\r
for (i = 1; i <= 81; i++) {\r
A[i] = 0;\r
\r
// mr1:\r
if (gotoMR1) {\r
- // System.out.println("mr1");\r
gotoMR1 = false;\r
i1 = (int) (MWC() >> 8) & 127;\r
if (i1 > 80) {\r
\r
// mr3:\r
if (gotoMR3) {\r
- // System.out.println("mr3");\r
gotoMR3 = false;\r
s = (int) (MWC() >> 9) & 15;\r
if (s > 8) {\r
}\r
s++;\r
A[i1] = s;\r
- // printf("\nA[i1:%d] = s:%d\n", i1, s);\r
- // System.out.println("A[i1:"+i1+"] = s:"+s);\r
m2 = solve();\r
\r
// add a random clue and solve it. No solution ==> remove it\r
// now we have a unique-solution sudoku. Now remove clues to\r
// make it minimal\r
{// EXPERIMENTAL: here is the grid with clues in it\r
- // System.out.println("SuexgJava.grid_generate() EXPERIMENTAL...");\r
for (i = 1; i <= 81; i++) {\r
grid_with_clues[i - 1] = A[i];\r
}\r
\r
x = i;\r
while (x >= i) {\r
- // System.out.println("mr4");\r
// mr4:\r
x = (int) (MWC() >> 8) & 127;\r
}\r
solve();\r
nt += nodes;\r
}\r
- // printf ( "new grid, rating:%6i", nt );\r
\r
if (nt < requestedRatingMin|| requestedRatingMax < nt) {\r
gotoM0 = true;\r
// (more\r
// than one sol.)\r
\r
- // System.out.println("SuexgJava.solve()");\r
/*\r
* boolean values used to simulate the infamous goto used in the\r
* original C suexg algorithm\r
clues = 0;\r
for (i = 1; i <= 81; i++) {\r
if (A[i] != 0) {\r
- // System.out.println("clues:"+clues);\r
clues++;\r
r = i * 9 - 9 + A[i];\r
for (j = 1; j <= Cols[r]; j++) {\r
\r
// m2: //////////\r
if (gotoM2) {\r
- // System.out.println("M2 ");\r
gotoM2 = false;\r
\r
i++;\r
I[i] = 0;\r
min = n + 1;\r
\r
- // System.out.println("i:"+i+" m0:"+m0+" ");\r
if (i > 81 || m0 != 0) {\r
- // System.out.println("SuexgJava.solve() ICI(1) ");\r
gotoM4 = true;\r
continue; // simulates: goto m4;\r
}\r
- // System.out.println("m1:"+m1+" ");\r
if (m1 != 0) {\r
C[i] = m1;\r
- // System.out.println("gotoM3 ");\r
gotoM3 = true;\r
continue; // simulates: goto m3;\r
}\r
if (Uc[c] == 0) {\r
if (V[c] < 2) {\r
C[i] = c;\r
- // System.out.println("gotoM3 ");\r
gotoM3 = true;\r
continue whileloop; // simulates: goto m3;\r
}\r
\r
// /mr:\r
if (gotoMR) {\r
- // System.out.println("MR ");\r
gotoMR = false;\r
\r
c2 = (int) (MWC() & Two[w]);\r
if (c2 >= w) {\r
gotoMR = true;\r
- // System.out.println("gotoMR ");\r
continue; // simulates: goto mr;\r
}\r
C[i] = W[c2 + 1];\r
gotoM3 = true;\r
- // System.out.println("gotoM3 ");\r
}\r
\r
// m3: //////\r
if (gotoM3) {\r
- // System.out.println("M3 ");\r
gotoM3 = false;\r
\r
c = C[i];\r
I[i]++;\r
if (I[i] > Rows[c]) {\r
- // System.out.println("SuexgJava.solve() ICI(2) ");\r
gotoM4 = true;\r
- // System.out.println("gotoM4 ");\r
continue; // simulates: goto m4;\r
}\r
r = Row[c][I[i]];\r
if (Ur[r] != 0) {\r
gotoM3 = true;\r
- // System.out.println("gotoM3 ");\r
continue; // simulates: goto m3;\r
}\r
m0 = 0;\r
break; // simulates: goto m9;\r
}\r
gotoM2 = true;\r
- // System.out.println("gotoM2 ");\r
continue; // simulates: goto m2;\r
} // end of m3 if\r
\r
// m4: ////\r
if (gotoM4) {\r
- // System.out.println("M4 ");\r
gotoM4 = false;\r
\r
i--;\r
\r
if (i > clues) {\r
gotoM3 = true;\r
- // System.out.println("gotoM3 ");\r
continue; // simulates: goto m3;\r
}\r
} // end of m4 if\r
break;\r
} // outer while loop\r
\r
- // System.out.println();\r
- // System.out.println("solve=>"+solutions);\r
// m9: /////\r
return solutions;\r
}\r
\r
public final Integer getInteger(String name, Integer defaultInteger) {\r
Object obj = map.get(name);\r
- System.out.println("UserPreferences.getInteger("+name+") found obj:"+obj);\r
if (!(obj instanceof Integer)) {\r
return defaultInteger;\r
}\r
\r
public final Boolean getBoolean(String name, Boolean defaultBoolean) {\r
Object obj = map.get(name);\r
- System.out.println("UserPreferences.getBoolean("+name+") found obj:"+obj);\r
if (!(obj instanceof Boolean)) {\r
return defaultBoolean;\r
}\r
private final HashMap<String, Action> map = new HashMap<String, Action>();
final Action get(String name) {
- System.out.println("ActionsRepository.get() name:"+name);
Action action = map.get(name);
- //System.out.println("ActionsRepository.get() found action:"+action);
return action;
}
try {
String httpVersionString = get();
- System.out
- .println("SwingApp.getHttpLatestVersionString() (embedded) Version.versionString:"
- + Version.versionString);
- System.out
- .println("SwingApp.getHttpLatestVersionString() retrieved versionString:"
- + httpVersionString);
-
if (httpVersionString.equals(Version.versionString)) {
- System.out
- .println("SwingApp.getHttpLatestVersionString() This version is up-to-date");
result = 0;
} else if (httpVersionString.startsWith("Sudokuki")) {
- System.out
- .println("SwingApp.getHttpLatestVersionString() This version is outdated. Please download the latest version from Sourceforge.");
checkUpdateAction.notifyNewVersionFound();
result = 1;
}
e.printStackTrace();
}
}
- System.out.println("getHttpLatestVersionString() line:" + line);
String versionString = "";
if (line != null) {
String[] strs = line.split(" is the latest version.");
}
private void cancelButtonClicked() {
- System.out.println("CheckUpdateDialog.cancelButtonClicked()");
boolean cancelled = worker.cancel(true);
- System.out.println("CheckUpdateDialog.cancelButtonClicked() cancelled:"
- + cancelled);
}
/**
public CustomGridAction(JFrame parent, String text, Icon icon,
String desc, Integer mnemonic, GridView view) {
super(text, icon);
- System.out.println("CustomGridAction.CustomGridAction()");
putValue(SHORT_DESCRIPTION, desc);
putValue(MNEMONIC_KEY, mnemonic);
@Override
public void actionPerformed(ActionEvent e) {
- System.out.println("CustomGridAction.actionPerformed()");
view.getController().notifyEnterCustomGridMode();
}
@Override
public boolean accept(File f) {
String extension = getExtension(f);
- System.out
- .println("OpenGridAction ext:"+extension+"|");
if (f.isDirectory() || "skg".equals(extension)) {
return true;
}
try {
int lo = fis.read();
int hi = fis.read();
-// System.out.println("OpenGridAction.actionPerformed() hi:"+hi+" lo:"+lo);
short together = (short) (hi << 8 | lo);
externalCellInfos[i] = (short) together;
-// System.out.println("OpenGridAction.actionPerformed() externalCellInfos["+i+"]:"+externalCellInfos[i]);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
private class InnerKeyListener extends KeyAdapter {
@Override
public void keyPressed(KeyEvent ke) {
- System.out.println("SwingGrid.InnerKeyAdapter.keyPressed() ke:"+ke);
int code = ke.getKeyCode();
boolean hasMoved = false;
if (code == KeyEvent.VK_KP_DOWN || code == KeyEvent.VK_DOWN || code == KeyEvent.VK_J) {
}
}
if (hasMoved) {
- System.out
- .println("SwingGrid.InnerKeyListener.keyPressed() has moved...");
view.getController().notifyFocusPositionChanged(posY, posX);
}
}
@Override
public void keyReleased(KeyEvent ke) {
- System.out.println("SwingGrid.InnerKeyAdapter.keyReleased() ke:"
- + ke);
int code = ke.getKeyCode();
if (code == KeyEvent.VK_SPACE) {
Point pos = getTopLeftPoint(posY, posX);
@Override
public void display() {
- System.out.println("SwingView.display()");
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
frame.setVisible(true);
frame.setSize(frame.getPreferredSize());
}
});
- System.out.println("SwingView.display()/");
}
public void gridChanged(final GridChangedEvent event) {
private void refreshClearAllMovesAction(GridModel model) {
if (actions == null) {
- System.out.println("SwingView.refreshClearAllMovesAction() actions is null...");
return;
}
Action clearAllMovesAction = actions.get("ClearAllMoves");
protected void refreshResolveAction(GridModel model) {
if (actions == null) {
- System.out.println("SwingView.refreshResolveAction() actions is null...");
return;
}
Action resolveAction = actions.get("ResolveGrid");
private void refreshCustomGridAction(GridModel model) {
if (actions == null) {
- System.out.println("SwingView.refreshCustomGridAction() actions is null...");
return;
}
Action customGridAction = actions.get("CustomGrid");
private void refreshPlayCustomGridAction(GridModel model) {
if (actions == null) {
- System.out.println("SwingView.refreshPlayCustomGridAction() actions is null...");
return;
}
Action playCustomGridAction = actions.get("PlayCustomGrid");