Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Soduko
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Soduko
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01073278
Message ID:
01073432
Views:
30
Clarify -
So, each 3x3 Grid must contain at least one row with sequence 1 thru 9 order, and no group of three on any of the nine rows can be identical. Is that the rule?


>Each 3x3 grid has to have 1 - 9 with no dups either. Something like:
>
>123-456-789
>456-789-123
>789-123-456
>
>234-567-891
>567-891-234
>891-234-567
>
>345-678-912
>678-912-345
>912-345-678
>
>
>>123-456-789
>>234-598-671
>>345-679-812
>>
>>569-742-138
>>678-913-245
>>786-124-593
>>
>>897-261-354
>>451-387-926
>>912-835-467
>>
>>Algorithym In English ---
>> Generate all rows start with 1 thru 9 then 2 thru 1 etc.
>> Loop process
>> Rule rule implies no groups of three are identical, shift dup-group xyz to yzx
>> Increment Column-to-check
>> From top row to bottom row, Trade number in row to for unique Column and loop
>> End Col-check
>> End-Group-check
>> End-loop
>>EOJ
>>
>>:~) I love a good puzzle
>>
>>
>>>I guess everyone has heard of Soduko (http://www.soduko.org/)
>>>
>>>I thought it would be a great project for me to get my feet wet w/Visual Studio...but...I'm having a terrible time trying to figure out the logic to create the puzzles. Here are the requirements:
>>>
>>>1. There's a 9x9 grid
>>>2. Each column contains the number 1-9 without duplicates
>>>3. Each row contains the numbers 1-9 without duplicates
>>>4. Each 3x3 grid contains the numbers 1-9 without duplicates - there are 9 of these 3x3 grids and they do not overlap - it looks something like this:
>>>
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>x x x - x x x - x x x
>>>
>>>It sounded rather easy at first - but - I can't get a handle on how to do this - any suggestions would be great. All I'm looking for is the logic - so if you only "speak" VFP, that would be fine...
>>>
>>>Thanks!
Edgar L. Bolton, B.S. B.B.A.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform