Class: Sudoku::S3

Inherits:
Object
  • Object
show all
Includes:
Grid
Defined in:
lib/sudoku.rb

Overview

Sudoku 9x9 (base 3) très rapide

Instance Method Summary collapse

Methods included from Solver

#missing_col, #missing_row, #missing_square, #remove_impossible!, #solve_backtrack!, #solve_backtrack_timeout, #solve_col!, #solve_naive!, #solve_row!, #solve_square!, #solve_uniq_possibilities!

Methods included from Generator

#make_diagonal, #make_valid, #make_valid_incomplete

Methods included from Logic

#base, #col, #completable?, #complete?, #count, #import, #inspect, #length, #load, #possibilities, #row, #square, #to_s, #to_sutxt, #valid?, #valid_cell?, #valid_grid?

Constructor Details

#initialize(base = 3) ⇒ S3

Argument ignoré, laissé pour des raisons d’uniformité



22
23
24
# File 'lib/sudoku.rb', line 22

def initialize base=3
  __initialize nil
end

Instance Method Details

#sizeFixnum

Renvoie le coté du Sudoku

Returns:

  • (Fixnum)


28
29
30
# File 'lib/sudoku.rb', line 28

def size
  SIZE
end