Skip to content

Farwaykorse/fwkSudoku

Repository files navigation

fwkSudoku

TravisCI Status
AppVeyor Status tests
Clang-Format cpplint yamllint
Codecov CodeFactor
Continuous Integration for branch master

Originally this started as a one of many small experiments while starting to learn C++. With a mild interest in properties of sudokus. It was mainly focused on the implementation of the data-structure and served to figure out the implementation and use of STL iterators.
It has become a familiar project to come back to. Suitable for experimentation while exploring the language and trying different techniques and tools.

Not many solvers have been implemented (they could be found on the web anyway). And no real user interface has been added. These might be implemented in time, but the main purpose of this project is experimentation and learning through play.

General Information

The code is mainly written using the Visual Studio platform, and compiled with the latest stable versions of MSVC, Clang and Intel on Windows, and GCC on Linux (in the WSL). See the AppVeyor and Travis CI continuous integration suites for an up-to-date selection of supported compilers and standard libraries (MS-STL, GNU libstdc++ and libc++).

Both MSBuild and CMake configurations are maintained. The MSBuild projects are updated to the last stable Visual Studio version, with configurations for Clang on Windows and the Intel C++ compilers.
The CMake configuration applies the same settings but for a wider variety of tool-chains and support for older compiler versions.

Several static analysers and extensive warning settings are used with each compiler.
More on the project and compiler configurations in: docs/Configuration.

Requirements:

Compiler with C++17 support. A recent CMake release (see cmake_minimum_required). Or Visual Studio 2019 to use the supplied solution.

Dependencies:

No external dependencies have been included in the repository. The project configurations expect these to be available on the include path. Development and CI testing is using the latest versions of external libraries imported using the vcpkg project, but any alternative method would suffice.

  • It makes use of elements from the GSL (Guideline Support Library), available at: Microsoft/GSL.
  • The unit-tests for the Sudoku library are implemented with Google Test.

Elements

Sudoku - Library

The main element is the Sudoku library. A header-only library, containing the data-structures and solver implementations.

See: Sudoku/README

Console - executable

Console implements a basic console application. No interface has been implemented. The current implementation executes a few (partial) solvers on several boards, to supply timings and detect performance regressions.

Unit-Testing

SudokuTest

The SudokuTest project contains the unit-tests for the Sudoku library. This uses the Google Test. unit-testing framework.

Note that the tests are in general extremely verbose. Especially the compile-time evaluations. This serves to generate an understanding of the implementation nuances. And additionally, it alerts on differences and changes in external factors. Such as library and compiler implementations.

See: SudokuTest/README

UnitTest

Earlier tests for the Sudoku library were implemented with MStest. These have been replaced by Google Test and are no longer part of the implementation.

License

Code licensed under the MIT License.

top