Giter Site home page Giter Site logo

sudoku's People

Contributors

aria-k-alethia avatar

Stargazers

 avatar

Watchers

 avatar

sudoku's Issues

后期维护建议

个人认为功能逻辑与输入输出部分的代码分离更易于维护。solve_and_output()generate_and_output()方法可以只传出得到的结果(如数组形式),而不输出到文件,让Sudoku外的方法负责输出,这样无论需要什么形式输入与输出都不用修改这两个方法的代码。

Sudoku::set方法修改建议

Sudoku::set方法中

for (int i = 1; i <= LEN; ++i) {
	for (int j = 1; j <= LEN; ++j) {
		board[i][j] = b[i][j];
	}
}

可以用memcpy()库函数进行复制

宏定义命名建议

Sudoku.cpp中这两行宏定义命名可以稍加修饰,明确用途

#define START 2
#define LEN 9

调试代码清除建议

InputHandler::get_board中的调试代码可以删除,git的版本控制能帮助找回之前代码。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.