macro in excel for Samurai?

For fans of Killer Sudoku, Samurai Sudoku and other variants

macro in excel for Samurai?

Postby Crazy Girl » Mon Jan 02, 2006 6:08 pm

Samurai, in form,
Code: Select all
P1  P2 
  P3
P4  P5

where P1, P2, P3, P4, P5 are the 5 Sudoku Puzzles that form the Samurai, with P3 sharing top left/top right/bottom left/bottom right blocks with appropiate puzzle.

Trying to program a macro in excel to give a candidate list for a Samurai, as found in the Times, but having difficulty on the overlapping blocks, idealy would like the candidates for a particular cell in one of these blocks (say *) to be the union of the candidates from the 2 involved puzzles (in * case P1 and P3), but this involves the function(fx) used for the sudoku puzzle to be used on 2 difference Sudoku's eg Union(cell, fx(P1), fx(P3) )
Code: Select all
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  P1 . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+---------+---------+
| .  .  . | .  .  . | .  .  . | .  .  . | .  .  . |
| .  .  . | .  .  . | .  *  . | .  .  . | .  .  . |
| .  .  . | .  .  . | .  .  . | .  .  . | .  .  . |
+---------+---------+---------+---------+---------+
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  P3 . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
                    +---------+---------+---------+
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
+---------+---------+---------+---------+---------+
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  P4 . | .  .  . |                 
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+


any ideas on how to procede?
Crazy Girl
 
Posts: 189
Joined: Tue Nov 08, 2005 5:00 pm

Postby Lardarse » Sun Jan 08, 2006 12:03 pm

There's a mistake in your picture...
Lardarse
 
Posts: 106
Joined: Fri Jul 01, 2005 4:00 pm

Postby Crazy Girl » Sun Jan 08, 2006 2:10 pm

Lardarse wrote:There's a mistake in your picture...


I've missed of P2 and P5 as the rows of the grid would not fit on the same line, so to make the picture understandable i missed off these sudoku grids.

Is this the mistake you are talkin' about:?:
Crazy Girl
 
Posts: 189
Joined: Tue Nov 08, 2005 5:00 pm

re: Excel for Samurai

Postby Pat » Sun Jan 08, 2006 3:59 pm

Crazy Girl wrote:Trying to program a macro in Excel to give a candidate list for a Samurai,
but having difficulty on the overlapping blocks

Would like the candidates for a particular cell in one of these blocks (say *) to be the union of the candidates from the 2 involved puzzles (in * case P1 and P3),
but this involves the function(fx) used for the SuDoku to be used on 2 difference SuDoku e.g. Union(cell, fx(P1), fx(P3) )


intersection ( rather than "Union" )


sorry i cannot help with Excel,
try theSudoku Programmers Forum

~ Pat
User avatar
Pat
 
Posts: 4056
Joined: Mon Jul 18, 2005 4:00 pm


Return to Sudoku variants

Who is online

Users browsing this forum: No registered users and 0 guests

cron