Let us just to see the right-top corner in your result:
'0', '1', '?', '?']
'0', '1', '?', '?']
'0', 'A', 'x', '?'] <----- The position A absolutely should not be 1
'0', 'x', '?', '?'] Because there are two(or more) mines around it.
'0', 'x', 'B', '1'] <----- The position B absolutely should not be 1
'0', '0', 'x', '0'] (actually here is 4, if you use `open` method to open it correctly)
Are you sure that you get the number by using method open(row,column)?
Why the number in front of "?" in the second row is 1, instead of 2?
Why your result contains a lot of 0s?
I wonder if the true difficulty for any rated difficulty level tends to drift over the years. I.e. this puzzle is from several years ago; maybe 2kyu was appropriate difficulty ranking when it was written but is no longer so.
It's the case of most katas in NASM. Kyus are shared among languages so we have no choice. Better this than not have kata in NASM at all, don't you agree?
According to the spec, if a user declares a global variable 'x = 5', then a function 'fn x => 0', that function should be valid.
Function parameter 'x' shadows a variable declared by the user. I can only guess why this is invalid. Maybe spec is wrong, or test case, or all function params must be used. I'll find out soon enough.
If a function has an argument called 'x', and there is also a global variable called 'x', the function should use the value of the supplied argument
Let us just to see the right-top corner in your result:
Are you sure that you get the number by using method
open(row,column)
?Why the number in front of "?" in the second row is 1, instead of 2?
Why your result contains a lot of 0s?
Congrats!
Ranks are drifting, yeah. Sometimes a lot. This one would be 4 nowadays, I guess...
How are the difficulty values set?
I wonder if the true difficulty for any rated difficulty level tends to drift over the years. I.e. this puzzle is from several years ago; maybe 2kyu was appropriate difficulty ranking when it was written but is no longer so.
It's the case of most katas in NASM. Kyus are shared among languages so we have no choice. Better this than not have kata in NASM at all, don't you agree?
Please use spoiler flag next time.
Hold on, the function name is 'x', while there is already a global variable named as such. An error is expected.
According to the spec, if a user declares a global variable 'x = 5', then a function 'fn x => 0', that function should be valid.
Function parameter 'x' shadows a variable declared by the user. I can only guess why this is invalid. Maybe spec is wrong, or test case, or all function params must be used. I'll find out soon enough.
This comment is hidden because it contains spoiler information about the solution
As I said above, I did the actual approach ~8days after.