Template:Sudoku 9x9 grid

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Sudoku 9x9
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
Documentation icon Template documentation
Sudoku grid display
Usage:
{{templateName|
  align=side            table alignment. left & right flow text. Defa:right
  title=title Text      table title, Defa: Sudoku 9x9
  tstyle=title style    title style body, for style="tstyle", Defa: blank
  bgcolor=color|        main background color, defa: fcfcc8
  bc=BoxBorderColor|    major table grid and outer border
  bx=BoxBorderWidth|    defa: 1.5pt, displays as 2xWidth
  b1c=color|b2c...|     background color for boxes 1..9, defa=bgcolor
  gc=GridColor|         minor box grid, defa: silver
  gx=GridWidth|         defa: 1.5pt
  cellsize=size|        cell size, defa: 30pt, the min. for square cells
  s1..s81|              81 cell square values, defa: blank
  c1..81...|            cell background color, defa: bNc or bgcolor
}}

Does: Displays a Sudoku Grid, with supplied values.

Args: None required, all have default values.

Template Call Tree        does and calls next
Sudoku 9x9 grid           top wrapper, set defa values
Sudoku 9x9 table          table with 9 boxes, 81 cells, major grids, outer border
Sudoku 3x3 box            3x3 box 9 cells
Sudoku 3x3 table          3x3 table with 9 cells, int. grids only, no outer border

Implementation Notes: (yes I am a compulsive newbie..}
|tparm={{{parm}}}|      parameter assignments must have a default value
  otherwise the target tparm gets the literal text "{{{parm}}}"
  when parm is undefined.  I.e.
  There is no way to pass on a param and have it be undefined 
  in the called template.
  {{{parm|}}} is sufficient and creates an empty param,
  which is not detected by subsequent {{{parm|}}} test as undef.
It's not possible to pass (in) an undefined numbered arg. 
  || passes a defined, but empty value, which cannot be detected and
  translated to a blank value.
The cell values cannot be empty, else the cell grid borders don't show. 
  Use   as default.

See [[Template:Sudoku 9x9 table]] and 
    [[Template:Sudoku 3x3 table]] for table trivia
Modeled after [[Template:4x4 type square]]
Orig: LarryLACa 11/4/05

This comment must cuddle next template call to avoid introducing nl whitespace in output,