First pass at a sudoku solver: Puzzle Import
Imports a puzzle from a string and displays the restricted puzzle.
This commit is contained in:
commit
bcc5b5097e
8 changed files with 179 additions and 0 deletions
20
solver/puzzle.h
Normal file
20
solver/puzzle.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "cell.h"
|
||||
|
||||
class Puzzle {
|
||||
public:
|
||||
static Puzzle FromString(std::string puzzle);
|
||||
|
||||
std::string CurrentState();
|
||||
std::string PencilMarkState();
|
||||
|
||||
void AssignSquare(uint8_t id, uint8_t value);
|
||||
|
||||
private:
|
||||
Puzzle();
|
||||
std::array<Cell, 81> cells_;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue