Module sudoku.solvers.solver¶
None
None
View Source
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ..puzzle import Puzzle, T
class Solver(ABC):
@abstractmethod
def solve(self, puzzle: Puzzle[T]) > bool:
"""Solve the puzzle in place.
Args:
puzzle (Puzzle): The puzzle to be solved.
Returns:
bool: Whether or not the puzzle is solved.
"""
...
__all__ = ("Solver",)
Classes¶
Solver¶
1 2 3 4 5 

View Source
class Solver(ABC):
@abstractmethod
def solve(self, puzzle: Puzzle[T]) > bool:
"""Solve the puzzle in place.
Args:
puzzle (Puzzle): The puzzle to be solved.
Returns:
bool: Whether or not the puzzle is solved.
"""
...
Ancestors (in MRO)¶
 abc.ABC
Descendants¶
 sudoku.solvers.strategy_solver.StrategySolver
Methods¶
solve¶
1 2 3 4 

Solve the puzzle in place.
Parameters:
Name  Type  Description  Default 

puzzle  Puzzle  The puzzle to be solved.  None 
Returns:
Type  Description 

bool  Whether or not the puzzle is solved. 
View Source
@abstractmethod
def solve(self, puzzle: Puzzle[T]) > bool:
"""Solve the puzzle in place.
Args:
puzzle (Puzzle): The puzzle to be solved.
Returns:
bool: Whether or not the puzzle is solved.
"""
...