Talk:Minesweeper game: Difference between revisions

→‎Too long?: recursion problem with Python 3 version
(→‎Too long?: recursion problem with Python 3 version)
 
(One intermediate revision by one other user not shown)
Line 3:
 
I freely admit that the task was chosen with an eye to attracting those new to programming :-)<br> --[[User:Paddy3118|Paddy3118]] 10:58, 10 July 2010 (UTC)
 
:Sometimes the Python version exceeds the standard [http://effbot.org/pyref/sys.getrecursionlimit.htm recursion limit] (1,000) on my machine when clearing the first grid point:
 
<pre>
There are 4 true mines of fixed position in the grid
 
......
......
......
......
m x y/c x y/p/r: c 2 4
Traceback (most recent call last):
File "/Users/martin/mine.py", line 125, in <module>
clear(x,y, showgrid, grid, mines, markedmines)
File "/Users/martin/mine.py", line 97, in clear
clear(xx, yy, showgrid, grid, mines, markedmines)
File "/Users/martin/mine.py", line 97, in clear
clear(xx, yy, showgrid, grid, mines, markedmines)
File "/Users/martin/mine.py", line 97, in clear
clear(xx, yy, showgrid, grid, mines, markedmines)
(repeats a zillion times...)
File "/Users/martin/mine.py", line 86, in clear
for xx in (x-1, x, x+1)
RuntimeError: maximum recursion depth exceeded while getting the str of an object
</pre>
 
:I suppose that's a bug? Otherwise, I'm pretty impressed with the brevity and readability of the Python solution! --[[User:Morn|Morn]] 11:15, 25 December 2010 (UTC)
 
== Differences in behavior from classic game ==
Line 31 ⟶ 58:
60% seems too high. --[[User:Rdm|Rdm]] 17:35, 21 July 2010 (UTC)
: Agreed. Based on Dgamey's values above perhaps the task spec of 20-60% mines should be changed to 10-20%.--[[User:Tikkanz|Tikkanz]] 21:36, 21 July 2010 (UTC)
:: I suggest making the revision optional so as not to invalidate original entries. --[[User:Dgamey|Dgamey]] 01:22, 22 July 2010 (UTC)
Anonymous user