[OT] Re: Lack of `outer` keyword makes inner class dup implossible
BCS
BCS at pathlink.com
Sat Jul 15 17:41:48 PDT 2006
Regan Heath wrote:
> On Fri, 14 Jul 2006 17:47:51 -0700, S. <user at pathlink.com> wrote:
>
>> On 2006-07-14 13:48:14 -0700, BCS <BCS at pathlink.com> said:
>>
>>> S. wrote:
>>>
>>>> It seems that because inner classes lack an `outer` keyword it is
>>>> impossible for
>>>> them to create a new instance for the purpose of COW when operators
>>>> like opCom
>>>> are called...
>>>> sudoku.d(318): outer class Foobar 'this' needed to 'new' nested
>>>> class BarBar
>>>>
>>> sudoku.d as in the game? What does the program do? Is it a
>>> generator, a solver, or a player? I ask because I have a solver done
>>> and would be interested in comparing them.
>>
>>
>> Yes, I'm fiddling around with an analytical solver. Mine currently
>> doesn't solve as many as I would like. I only implemented three
>> elimination methods so far.
>
> I wrote a sudoku solver too. It expects the puzzle in a CSV file,
> example attached.
>
> As far as I know it will solve anything which is 'logically solvable'
> .. in other words as long as there is always at least one definate next
> step with no 2+ choices and guessing involved.
>
> Regan
Mine goes the other direction, only set cells that have only one choice
left, when you run out of those, store the state and guess. It uses a
stack like system for the states. It was/is solving puzzles in about
2.75 ms. I think it will solve any puzzle that can be solved, and with a
little modification, will check if more than one solution exists.
More information about the Digitalmars-d
mailing list