From: John L. <jr...@us...> - 2007-03-01 05:27:51
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5986/wxLua/samples Modified Files: wxluasudoku.wx.lua Log Message: fix printing bug, don't need to return the table passed to a function that we've modified Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** wxluasudoku.wx.lua 8 Feb 2007 04:10:41 -0000 1.64 --- wxluasudoku.wx.lua 1 Mar 2007 05:27:47 -0000 1.65 *************** *** 50,55 **** -- Set a value in the table or subtable, first making sure that the subtables ! -- are created first. ! -- a = TableSetValue(3, a, "How", "Are", 4, "You") ==> a.How.Are[4].You = 3 function TableSetValue(value, atable, ...) if type(atable) ~= "table" then atable = {} end --- 50,55 ---- -- Set a value in the table or subtable, first making sure that the subtables ! -- are created first. Modifies the input table. [...990 lines suppressed...] sudokuGUI.sudokuTables[1] = s --- 4987,4991 ---- local s = sudoku.CreateTable() ! sudoku.SetValues(values, s) sudokuGUI.sudokuTables_pos = 1 sudokuGUI.sudokuTables[1] = s *************** *** 5128,5132 **** local s = sudoku.GeneratePuzzle() s = sudoku.GeneratePuzzleDifficulty(35, s, true) ! s = sudoku.UpdateTable(s) local n, h = sudoku.FindAllNakedHiddenGroups(true, s) --- 5106,5110 ---- local s = sudoku.GeneratePuzzle() s = sudoku.GeneratePuzzleDifficulty(35, s, true) ! sudoku.UpdateTable(s) local n, h = sudoku.FindAllNakedHiddenGroups(true, s) |