├── Simple-sudoku-master ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── item_choose_layout.xml │ │ │ │ └── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── jobs │ │ │ │ │ └── newsudo │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── Sudo.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── jobs │ │ │ │ └── newsudo │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── jobs │ │ │ └── newsudo │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── README.md ├── .idea │ ├── copyright │ │ └── profiles_settings.xml │ ├── caches │ │ ├── gradle_models.ser │ │ └── build_file_checksums.ser │ ├── encodings.xml │ ├── vcs.xml │ ├── modules.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── compiler.xml │ ├── misc.xml │ └── codeStyles │ │ └── Project.xml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── SudokuApp-GS └── Sudoku │ ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── ic_launcher-web.png │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── attrs.xml │ │ │ │ │ ├── styles.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── focus.xml │ │ │ │ │ ├── wrong_box.xml │ │ │ │ │ ├── border.xml │ │ │ │ │ ├── option_background.xml │ │ │ │ │ ├── border_selected.xml │ │ │ │ │ ├── ic_play_arrow_black_24dp.xml │ │ │ │ │ ├── ic_pause_black_24dp.xml │ │ │ │ │ ├── ic_equalizer_black_12dp.xml │ │ │ │ │ ├── ic_star_black_24dp.xml │ │ │ │ │ ├── ic_create_black_24dp.xml │ │ │ │ │ ├── ic_info_outline_black_12dp.xml │ │ │ │ │ ├── ic_star_border_black_24dp.xml │ │ │ │ │ ├── ic_restore_black_24dp.xml │ │ │ │ │ ├── ic_timer_black_12dp.xml │ │ │ │ │ ├── ic_timer_black_24dp.xml │ │ │ │ │ ├── ic_person_outline_black_12dp.xml │ │ │ │ │ ├── ic_iconmonstr_eraser_2.xml │ │ │ │ │ ├── ic_iconmonstr_light_bulb_18.xml │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── anim │ │ │ │ │ ├── rotateundo.xml │ │ │ │ │ ├── moveerase.xml │ │ │ │ │ └── scalenote.xml │ │ │ │ ├── layout │ │ │ │ │ ├── activity_history.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── activity_choose_type.xml │ │ │ │ │ ├── activity_login.xml │ │ │ │ │ └── history_item.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── assets │ │ │ │ └── litepal.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── sudoku │ │ │ │ │ ├── UserAction │ │ │ │ │ ├── EnterAction.java │ │ │ │ │ ├── EraseAction.java │ │ │ │ │ ├── ReplaceAction.java │ │ │ │ │ └── UserAction.java │ │ │ │ │ ├── userInfo.java │ │ │ │ │ ├── dlx │ │ │ │ │ ├── SudokuHandler.java │ │ │ │ │ ├── DancingLinks.java │ │ │ │ │ └── GenerateBoard.java │ │ │ │ │ ├── SudokuTextView.java │ │ │ │ │ ├── MD5.java │ │ │ │ │ ├── History.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── GameRecord.java │ │ │ │ │ ├── SudokuGrid.java │ │ │ │ │ ├── LastRecord.java │ │ │ │ │ ├── ChooseLevel.java │ │ │ │ │ ├── ChooseType.java │ │ │ │ │ ├── HistoryItemAdapter.java │ │ │ │ │ └── login.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── sudoku │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── sudoku │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle │ ├── settings.gradle │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── .idea │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── misc.xml │ └── codeStyles │ │ └── Project.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradlew.bat │ └── gradlew ├── newSudoku ├── .idea │ ├── .gitignore │ ├── vcs.xml │ ├── misc.xml │ ├── modules.xml │ └── $PRODUCT_WORKSPACE_FILE$ ├── Sudoku_Guide.md ├── SudokuDLXTest.java ├── dlx │ ├── SudokuHandler.java │ ├── GenerateBoard.java │ ├── DancingLinks.java │ └── SudokuDLX.java └── dlxTest.java ├── Sudoku └── dlx │ ├── .idea │ ├── .gitignore │ ├── vcs.xml │ ├── misc.xml │ ├── modules.xml │ └── $PRODUCT_WORKSPACE_FILE$ │ ├── dlx │ ├── SolutionHandler.java │ ├── SudokuDLX.java │ ├── AbstractSudokuSolver.java │ ├── GenerateBoard.java │ └── DancingLinks.java │ └── dlxTest.java ├── imgs ├── 九宫.png ├── 历史.png └── 四宫.png ├── 新建文本文档.txt ├── dancing-color.ps.pdf ├── 2019《软件工程》项目任务书(2017级).docx ├── 《软件工程》项目报告撰写内容及规范化参考样本.docx ├── assignment ├── 2019《软件工程》项目任务书(2017级).docx └── 《软件工程》项目报告撰写内容及规范化参考样本.docx ├── DailyRecord.md ├── NABCD.md ├── .gitignore └── README.md /Simple-sudoku-master/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Simple-sudoku-master/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /newSudoku/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /Sudoku/dlx/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /Simple-sudoku-master/README.md: -------------------------------------------------------------------------------- 1 | # Simple-sudoku 2 | 3 | 这个是我在 CSDN 上的博文写的简单数独实现的代码。 4 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name='Sudoku' 3 | -------------------------------------------------------------------------------- /imgs/九宫.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/imgs/九宫.png -------------------------------------------------------------------------------- /imgs/历史.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/imgs/历史.png -------------------------------------------------------------------------------- /imgs/四宫.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/imgs/四宫.png -------------------------------------------------------------------------------- /新建文本文档.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/新建文本文档.txt -------------------------------------------------------------------------------- /dancing-color.ps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/dancing-color.ps.pdf -------------------------------------------------------------------------------- /2019《软件工程》项目任务书(2017级).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/2019《软件工程》项目任务书(2017级).docx -------------------------------------------------------------------------------- /《软件工程》项目报告撰写内容及规范化参考样本.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/《软件工程》项目报告撰写内容及规范化参考样本.docx -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | NewSudo 3 | 4 | -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assignment/2019《软件工程》项目任务书(2017级).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/assignment/2019《软件工程》项目任务书(2017级).docx -------------------------------------------------------------------------------- /assignment/《软件工程》项目报告撰写内容及规范化参考样本.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/assignment/《软件工程》项目报告撰写内容及规范化参考样本.docx -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Simple-sudoku-master/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /Simple-sudoku-master/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/Simple-sudoku-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HUSTERGS/SoftwareEngineeringProject/HEAD/SudokuApp-GS/Sudoku/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /newSudoku/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sudoku/dlx/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Sudoku/dlx/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sudoku/dlx/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /newSudoku/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/focus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/wrong_box.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /newSudoku/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Simple-sudoku-master/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 17 17:05:31 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/option_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/border_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_play_arrow_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_pause_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_equalizer_black_12dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_star_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #ffffffff 7 | #ff9E9E9E 8 | #ff000000 9 | 10 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/assets/litepal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_create_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_info_outline_black_12dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/java/com/example/jobs/newsudo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.jobs.newsudo; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class MainActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | //setContentView(R.layout.activity_main); 12 | setContentView(new Sudo(this)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/test/java/com/example/sudoku/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_star_border_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/test/java/com/example/jobs/newsudo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.jobs.newsudo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/anim/rotateundo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 14 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_restore_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_timer_black_12dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_timer_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sudoku/dlx/.idea/$PRODUCT_WORKSPACE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_person_outline_black_12dp.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /newSudoku/.idea/$PRODUCT_WORKSPACE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Simple-sudoku-master/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.2' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/UserAction/EnterAction.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku.UserAction; 2 | 3 | import android.widget.GridLayout; 4 | 5 | import com.example.sudoku.SudokuTextView; 6 | 7 | public class EnterAction extends UserAction { 8 | public EnterAction(int column, int row, int currentNum, int size) { 9 | super(1, column, row, -1, currentNum, size); 10 | } 11 | 12 | @Override 13 | void undoAction(SudokuTextView textView, int[][] currentBoard) { 14 | textView.setText(""); 15 | currentBoard[textView.getRow()][textView.getColumn()] = 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/anim/moveerase.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/UserAction/EraseAction.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku.UserAction; 2 | 3 | import android.widget.GridLayout; 4 | 5 | import com.example.sudoku.SudokuTextView; 6 | 7 | public class EraseAction extends UserAction { 8 | 9 | public EraseAction(int column, int row, int originNum, int size) { 10 | super(0, column, row, originNum, -1, size); 11 | } 12 | 13 | @Override 14 | void undoAction(SudokuTextView textView, int[][] currentBoard) { 15 | textView.setText(Integer.toString(originNum)); 16 | currentBoard[textView.getRow()][textView.getColumn()] = originNum; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/userInfo.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | import org.litepal.crud.LitePalSupport; 4 | 5 | public class userInfo extends LitePalSupport { 6 | private String userName; 7 | private String passwordHash; 8 | 9 | public String getUserName() { 10 | return this.userName; 11 | } 12 | public String getPasswordHash() { 13 | return this.passwordHash; 14 | } 15 | public void setUserName(String userName) { 16 | this.userName = userName; 17 | } 18 | public void setPasswordHash(String passwordHash) { 19 | this.passwordHash = passwordHash; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/UserAction/ReplaceAction.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku.UserAction; 2 | 3 | import android.widget.GridLayout; 4 | 5 | import com.example.sudoku.SudokuTextView; 6 | 7 | public class ReplaceAction extends UserAction { 8 | public ReplaceAction(int column, int row, int originNum, int currentNum, int size) { 9 | super(2, column, row, originNum, currentNum, size); 10 | } 11 | 12 | @Override 13 | void undoAction(SudokuTextView textView, int[][] currentBoard) { 14 | textView.setText(Integer.toString(originNum)); 15 | currentBoard[textView.getRow()][textView.getColumn()] = originNum; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.5.1' 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/anim/scalenote.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 20 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_iconmonstr_eraser_2.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DailyRecord.md: -------------------------------------------------------------------------------- 1 | # 9.9 讨论 2 | 3 | 1. 选题 4 | 2. NABCD大纲 5 | 3. 试玩其他的软件找到缺陷和优点 6 | 7 | 8 | 9 | 10 | 11 | 1. 广告 12 | 2. 权限 13 | 3. 很单一,题目单一 14 | 4. 不同大小盘局 15 | 5. 16 | 17 | 18 | 19 | ## 9.10 20 | 21 | 注册,安装github => 22 | 23 | 熟悉modao 24 | 25 | 下载安装AS 26 | 27 | github follow 28 | 29 | git 基本操作 30 | 31 | 分工: 32 | 33 | 1. 前端 34 | 2. 后端 35 | 3. presentation 36 | 4. 了解基本操作Android 37 | * 界面跳转 38 | * pop 39 | 40 | 推荐?: 41 | 42 | 1. 第一行代码 43 | 2. Java?基本了解 《Core Java》《Java 核心编程》 44 | 45 | 直接做? 46 | 47 | NABCD,word? 48 | 49 | 50 | 51 | ## 9.18 52 | 53 | modao => 基本的界面 孙 很棒 54 | 55 | git!! 56 | 57 | 基本数独开始写9x9, java => 葛 没有完成 58 | 59 | 前端 => 林 完成 60 | 61 | 解包apk? 62 | 63 | 时限;一周 64 | 65 | ## 9.25 66 | 67 | 数独算法 68 | 69 | 提交 android 代码 70 | 71 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\jobs\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /newSudoku/Sudoku_Guide.md: -------------------------------------------------------------------------------- 1 | 类说明 2 | 3 | `DancingLinks` 4 | 5 | 用于解决**exact cover problem** 6 | 7 | 调用传入的`SudokuHandler`将解出来的答案(如果有的话)转化为数独格局,并返回 8 | 9 | 10 | 11 | `SudokuHandler` 12 | 13 | 纯粹的方法类,用于辅助`DancingLinks` 14 | 15 | 16 | 17 | `SudokuDLX(int gridLength, int side)` 18 | 19 | 利用`DancingLinks`算法来解决 20 | 21 | `gridLength`为棋盘宽度,`side`为一个block的宽度,九宫格分别为`9`和`3` 22 | 23 | 实例属性: 24 | 25 | `solutions`解的个数 26 | 27 | `solutionBoard`解出来的棋盘 28 | 29 | 静态方法: 30 | 31 | * `printBoard(int[][])` 32 | * `copyBoard(int[][] board, int[][] newBoard)`,将`board`复制到`newBoard` 33 | 34 | 实例方法: 35 | 36 | * `solve(int[][] sudoku)`解决输入的数独 37 | 38 | 39 | 40 | `GenerateBoard` 41 | 42 | 1. `init` 43 | 2. `run(int level)`表示挖掉的个数 9宫不要超过50个,4宫不要超过12个 44 | 3. 通过`.board`方法得到生成的数独 45 | 4. 通过`.anwser`方法得到答案(也可以重新算一遍) -------------------------------------------------------------------------------- /Simple-sudoku-master/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Simple-sudoku-master/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/androidTest/java/com/example/jobs/newsudo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.jobs.newsudo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.jobs.newsudo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/androidTest/java/com/example/sudoku/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.example.sudoku", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/layout/activity_history.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "24.0.0" 6 | defaultConfig { 7 | applicationId "com.example.jobs.newsudo" 8 | minSdkVersion 21 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:23.4.0' 28 | testCompile 'junit:junit:4.12' 29 | } 30 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Android 10 | 11 | 12 | EncapsulationJava 13 | 14 | 15 | Java 16 | 17 | 18 | LintAndroid 19 | 20 | 21 | SecurityLintAndroid 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /newSudoku/SudokuDLXTest.java: -------------------------------------------------------------------------------- 1 | import dlx.SudokuDLX; 2 | import org.junit.Assert; 3 | import org.junit.Assert.*; 4 | import org.junit.Test; 5 | 6 | public class SudokuDLXTest { 7 | @Test 8 | public void test() { 9 | int[][] hardest = { 10 | {0,0,0,0,8,2,9,5,6}, 11 | {5,8,0,6,0,0,0,0,4}, 12 | {0,0,3,1,0,0,2,0,0}, 13 | {0,4,1,0,7,0,5,0,0}, 14 | {7,6,0,5,0,1,0,9,2}, 15 | {0,0,9,0,4,0,1,8,0}, 16 | {0,0,5,0,0,8,7,0,0}, 17 | {8,0,0,0,0,5,0,3,9}, 18 | {9,2,6,7,1,0,0,0,0} 19 | }; 20 | 21 | int[][] testFour = { 22 | {0,3,1,0}, 23 | {1,0,0,3}, 24 | {2,0,3,4}, 25 | {0,4,2,0} 26 | }; 27 | Assert.assertTrue(SudokuDLX.validateSudoku(hardest)); 28 | Assert.assertTrue(SudokuDLX.validateSudoku(testFour)); 29 | Assert.assertTrue(SudokuDLX.validatePosition(testFour, 0, 0, 4)); 30 | Assert.assertFalse(SudokuDLX.validatePosition(testFour,0,0,2)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | 21 | -------------------------------------------------------------------------------- /NABCD.md: -------------------------------------------------------------------------------- 1 | # 基本信息 2 | 3 | ### 组名:中秋快乐 4 | 5 | ### 组员: 6 | 7 | * 林瑞忞 U201714590 8 | * 孙雯 U201714617 9 | * 葛松 U201714668 10 | 11 | ### 所选题目: 数独 APP 12 | 13 | # NABCD模型 14 | 15 | ### N(Need 需求)你的创意解决了用户的什么需求? 16 | 17 | ​ 首先,通勤时间或一些零碎时间,需要具有一定的挑战性的事情来消磨,但不至于玩物丧志;其次,对于益智类数独游戏而言,由于用户手边没有纸和笔,使用手机APP操作会更便捷,且市场上存在的数独游戏APP有权限索要、广告繁杂、数独形式单一等问题;同时,数独爱好者对于专业性、高难度数独有所渴求,而且普通用户缺乏数独技巧,对一些专业知识的指导也有需求;除此之外,玩数独游戏考验耐心,缺乏趣味性,单人作战略显枯燥。 18 | 19 | ### A(Approach 做法)你有什么招数来解决用户的痛苦或问题? 20 | 21 | ​ 首先,提供离线游玩的可能,在用户没有网络时也可以进行游戏。其次,对于不同的用户人群和空闲时间限制,提供不同玩法模式的选择(如限时和闯关),可以增加多样性。比如,向高阶数独爱好者提供数独比赛中的一些独特类型的数独,如:具有额外区域的数独、有标注提示要求的数独、不同形状的数独等;向普通用户提供一些常用的技巧,供查找学习和讨论,提高求解数独的能力。并且为增加趣味性,提供多人游玩的功能,如通过网络或者局域网与朋友或陌生人进行比赛或协作,有一些社交属性。 22 | 23 | ### B(Benefit 好处)你这个产品或服务会给用户带来什么好处? 24 | 25 | ​ 用户可以充分利用闲暇时间放松一下,而又不至于玩物丧志,且多人对战或者协作可以认识新的朋友、增进朋友之间的感情、收获乐趣。同时,硬核玩家可以通过这个游戏得到专业锻炼,而普通用户可以通过查看学习相关的数独技巧,可以循序渐进地掌握数独的高阶玩法,进一步锻炼大脑,提高解题能力。 26 | 27 | ### C(Competitors 竞争)你的产品有没有类似的竞争者,他们的产品怎么样? 28 | 29 | ​ 市面上存在许多数独游戏,基本功能也比较齐全。但是大多数APP都充斥着各种广告,并且请求各种不需要的权限,不仅会让用户感到烦心,还可能对用户的个人信息安全造成不可预知的威胁。大多数的产品也缺乏创新,都是更改盘局大小或者增减一开始会出现的数字来调整难度,没有什么独特的题型。 30 | 31 | ### D(Delivery 推广)你如何推销你的产品? 32 | 33 | ​ 联合各大数独比赛进行联合宣传,与他们合作,在APP中提供往届经典试题和解法等;还可以在社交软件上进行嵌入,如微信小程序,借助软件可能具有的社交属性进行宣传。 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # IntelliJ 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/assetWizardSettings.xml 41 | .idea/dictionaries 42 | .idea/libraries 43 | .idea/caches 44 | 45 | # Keystore files 46 | # Uncomment the following line if you do not want to check your keystore files in. 47 | #*.jks 48 | 49 | # External native build folder generated in Android Studio 2.2 and later 50 | .externalNativeBuild 51 | 52 | # Google Services (e.g. APIs or Firebase) 53 | google-services.json 54 | 55 | # Freeline 56 | freeline.py 57 | freeline/ 58 | freeline_project_description.json 59 | 60 | # fastlane 61 | fastlane/report.xml 62 | fastlane/Preview.html 63 | fastlane/screenshots 64 | fastlane/test_output 65 | fastlane/readme.md 66 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sudoku 3 | Undo 4 | Erase 5 | Note 6 | Count Down 7 | 开启纠错 8 | 开启颜色 9 | 简单 10 | 中等 11 | 困难 12 | 极难 13 | 选择难度 14 | 选择模式 15 | 四 宫 16 | 九 宫 17 | 继续上一次 18 | Sign in 19 | Email 20 | Password 21 | Sign in or register 22 | Sign in 23 | "Welcome !" 24 | Not a valid username 25 | Password must be >5 characters 26 | "Login failed" 27 | 28 | -------------------------------------------------------------------------------- /newSudoku/dlx/SudokuHandler.java: -------------------------------------------------------------------------------- 1 | package dlx; 2 | 3 | import dlx.DancingLinks.*; 4 | import java.util.*; 5 | 6 | // 纯粹的功能类 7 | public class SudokuHandler { 8 | private int size; 9 | // 将dancing link 得到的结果转化为board 10 | public int[][] handleSolution(List answer){ 11 | int[][] result = parseBoard(answer); 12 | // AbstractSudokuSolver.printSolution(result); 13 | return result; 14 | } 15 | 16 | private int[][] parseBoard(List answer){ 17 | int[][] result = new int[size][size]; 18 | for(DancingNode n : answer){ 19 | DancingNode rcNode = n; 20 | int min = Integer.parseInt(rcNode.C.name); 21 | for(DancingNode tmp = n.R; tmp != n; tmp = tmp.R){ 22 | int val = Integer.parseInt(tmp.C.name); 23 | if (val < min){ 24 | min = val; 25 | rcNode = tmp; 26 | } 27 | } 28 | int ans1 = Integer.parseInt(rcNode.C.name); 29 | int ans2 = Integer.parseInt(rcNode.R.C.name); 30 | int r = ans1 / size; 31 | int c = ans1 % size; 32 | int num = (ans2 % size) + 1; 33 | result[r][c] = num; 34 | } 35 | return result; 36 | } 37 | 38 | public SudokuHandler(int boardSize){ 39 | size = boardSize; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/dlx/SudokuHandler.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku.dlx; 2 | 3 | import com.example.sudoku.dlx.DancingLinks.*; 4 | import java.util.*; 5 | 6 | // 纯粹的功能类 7 | public class SudokuHandler { 8 | private int size; 9 | // 将dancing link 得到的结果转化为board 10 | public int[][] handleSolution(List answer){ 11 | int[][] result = parseBoard(answer); 12 | // AbstractSudokuSolver.printSolution(result); 13 | return result; 14 | } 15 | 16 | private int[][] parseBoard(List answer){ 17 | int[][] result = new int[size][size]; 18 | for(DancingNode n : answer){ 19 | DancingNode rcNode = n; 20 | int min = Integer.parseInt(rcNode.C.name); 21 | for(DancingNode tmp = n.R; tmp != n; tmp = tmp.R){ 22 | int val = Integer.parseInt(tmp.C.name); 23 | if (val < min){ 24 | min = val; 25 | rcNode = tmp; 26 | } 27 | } 28 | int ans1 = Integer.parseInt(rcNode.C.name); 29 | int ans2 = Integer.parseInt(rcNode.R.C.name); 30 | int r = ans1 / size; 31 | int c = ans1 % size; 32 | int num = (ans2 % size) + 1; 33 | result[r][c] = num; 34 | } 35 | return result; 36 | } 37 | 38 | public SudokuHandler(int boardSize){ 39 | size = boardSize; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sudoku/dlx/dlx/SolutionHandler.java: -------------------------------------------------------------------------------- 1 | package dlx; 2 | 3 | import dlx.DancingLinks.*; 4 | import java.util.*; 5 | 6 | public interface SolutionHandler{ 7 | int[][] handleSolution(List solution); 8 | } 9 | 10 | class SudokuHandler implements SolutionHandler{ 11 | int size = 9; 12 | 13 | public int[][] handleSolution(List answer){ 14 | int[][] result = parseBoard(answer); 15 | // AbstractSudokuSolver.printSolution(result); 16 | return result; 17 | } 18 | 19 | private int[][] parseBoard(List answer){ 20 | int[][] result = new int[size][size]; 21 | for(DancingNode n : answer){ 22 | DancingNode rcNode = n; 23 | int min = Integer.parseInt(rcNode.C.name); 24 | for(DancingNode tmp = n.R; tmp != n; tmp = tmp.R){ 25 | int val = Integer.parseInt(tmp.C.name); 26 | if (val < min){ 27 | min = val; 28 | rcNode = tmp; 29 | } 30 | } 31 | int ans1 = Integer.parseInt(rcNode.C.name); 32 | int ans2 = Integer.parseInt(rcNode.R.C.name); 33 | int r = ans1 / size; 34 | int c = ans1 % size; 35 | int num = (ans2 % size) + 1; 36 | result[r][c] = num; 37 | } 38 | return result; 39 | } 40 | 41 | 42 | 43 | public SudokuHandler(int boardSize){ 44 | size = boardSize; 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/SudokuTextView.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | 4 | import android.content.Context; 5 | import android.content.res.TypedArray; 6 | import android.util.AttributeSet; 7 | import android.view.Gravity; 8 | import android.widget.GridLayout; 9 | import android.widget.LinearLayout; 10 | import android.widget.TextView; 11 | 12 | import androidx.appcompat.widget.AppCompatTextView; 13 | import androidx.constraintlayout.solver.GoalRow; 14 | 15 | import org.w3c.dom.Text; 16 | import com.example.sudoku.SudokuNine; 17 | 18 | public class SudokuTextView extends AppCompatTextView { 19 | private int column; 20 | private int row; 21 | 22 | public int getColumn(){ 23 | return column; 24 | } 25 | 26 | public int getRow() { 27 | return row; 28 | } 29 | 30 | public SudokuTextView(Context context, AttributeSet attrs) { 31 | super(context,attrs); 32 | 33 | TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.SudokuTextViewCustomAttr); 34 | 35 | int column = ta.getInteger(R.styleable.SudokuTextViewCustomAttr_column, -1); 36 | int row = ta.getInteger(R.styleable.SudokuTextViewCustomAttr_row, -1); 37 | this.column = column; 38 | this.row = row; 39 | } 40 | 41 | public SudokuTextView(Context context, int column, int row) { 42 | super(context); 43 | this.column = column; 44 | this.row = row; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/MD5.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | import java.math.BigInteger; 3 | import java.security.MessageDigest; 4 | import java.security.NoSuchAlgorithmException; 5 | 6 | public class MD5 { 7 | public static String getMd5(String input) 8 | { 9 | try { 10 | 11 | // Static getInstance method is called with hashing MD5 12 | MessageDigest md = MessageDigest.getInstance("MD5"); 13 | 14 | // digest() method is called to calculate message digest 15 | // of an input digest() return array of byte 16 | byte[] messageDigest = md.digest(input.getBytes()); 17 | 18 | // Convert byte array into signum representation 19 | BigInteger no = new BigInteger(1, messageDigest); 20 | 21 | // Convert message digest into hex value 22 | String hashtext = no.toString(16); 23 | while (hashtext.length() < 32) { 24 | hashtext = "0" + hashtext; 25 | } 26 | return hashtext; 27 | } 28 | 29 | // For specifying wrong message digest algorithms 30 | catch (NoSuchAlgorithmException e) { 31 | throw new RuntimeException(e); 32 | } 33 | } 34 | 35 | // Driver code 36 | public static void main(String args[]) throws NoSuchAlgorithmException 37 | { 38 | String s = "GeeksForGeeks"; 39 | System.out.println("Your HashCode Generated by MD5 is: " + getMd5(s)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.2" 6 | defaultConfig { 7 | applicationId "com.example.sudoku" 8 | minSdkVersion 24 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | vectorDrawables.useSupportLibrary = true 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | compileOptions { 22 | sourceCompatibility = 1.8 23 | targetCompatibility = 1.8 24 | } 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | implementation 'androidx.appcompat:appcompat:1.1.0' 30 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 31 | implementation 'androidx.annotation:annotation:1.1.0' 32 | implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' 33 | testImplementation 'junit:junit:4.12' 34 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 35 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 36 | implementation 'androidx.gridlayout:gridlayout:1.0.0' 37 | implementation 'com.google.android.material:material:1.0.0' 38 | implementation 'org.litepal.android:java:3.0.0' 39 | } 40 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/UserAction/UserAction.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku.UserAction; 2 | 3 | import android.widget.GridLayout; 4 | import android.widget.RelativeLayout; 5 | 6 | import com.example.sudoku.SudokuNine; 7 | import com.example.sudoku.SudokuTextView; 8 | 9 | abstract public class UserAction { 10 | // 几种动作,擦除,在空的位置输入,在非空位置输入 11 | protected final int ERASE = 0; 12 | protected final int ENTER = 1; 13 | protected final int REPLACE = 2; 14 | 15 | protected int column; 16 | protected int row; 17 | protected int originNum; 18 | protected int currentNum; 19 | protected int actionType; 20 | protected int size; 21 | 22 | public int getIndex() { 23 | return row * size + column; 24 | } 25 | 26 | public UserAction(int type, int column, int row, int originNum, int currentNum, int size) { 27 | this.column = column; 28 | this.row = row; 29 | this.originNum = originNum; 30 | this.currentNum = currentNum; 31 | this.actionType = type; 32 | this.size = size; 33 | } 34 | public void undo(GridLayout gridLayout, int[][] currentBoard){ 35 | RelativeLayout relativeLayout = (RelativeLayout) gridLayout.getChildAt(row * size + column); 36 | // undoAction((SudokuTextView) gridLayout.getChildAt(row * size + column), currentBoard); 37 | undoAction((SudokuTextView) relativeLayout.getChildAt(0), currentBoard); 38 | } 39 | abstract void undoAction(SudokuTextView textView, int[][] currentBoard); 40 | } 41 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 28 | 29 | -------------------------------------------------------------------------------- /newSudoku/dlxTest.java: -------------------------------------------------------------------------------- 1 | import dlx.*; 2 | 3 | public class dlxTest { 4 | public static void main(String[] args) { 5 | // int[][] hardest = { 6 | // {0,0,0,0,8,2,9,5,6}, 7 | // {5,8,0,6,0,0,0,0,4}, 8 | // {0,0,3,1,0,0,2,0,0}, 9 | // {0,4,1,0,7,0,5,0,0}, 10 | // {7,6,0,5,0,1,0,9,2}, 11 | // {0,0,9,0,4,0,1,8,0}, 12 | // {0,0,5,0,0,8,7,0,0}, 13 | // {8,0,0,0,0,5,0,3,9}, 14 | // {9,2,6,7,1,0,0,0,0} 15 | // }; 16 | // int[][] testFour = { 17 | // {0,3,1,0}, 18 | // {1,0,0,3}, 19 | // {2,0,3,4}, 20 | // {0,4,2,0} 21 | // }; 22 | // SudokuDLX sudoku = new SudokuDLX(9, 3); 23 | // 24 | // if (sudoku.solve(hardest)) { 25 | // System.out.println(sudoku.solutions); 26 | // SudokuDLX.printBoard(sudoku.solutionBoard); 27 | // } else { 28 | // System.out.println("Invalid sudoku!"); 29 | // } 30 | 31 | GenerateBoard newBoard = new GenerateBoard(9,3); 32 | // 初始化一个棋盘,最开始随机放置了INITNUM个数字,然后开始解这个棋盘来得到终局,可以通过多次init来得到不同的终局 33 | newBoard.initBoard(); 34 | // 开始挖洞,level参数为挖掉的数目 35 | newBoard.run(12); 36 | // 打印棋盘 37 | newBoard.printBoard(); 38 | 39 | System.out.println(newBoard.actualLevel); 40 | SudokuDLX sudokuDLX = new SudokuDLX(4,2); 41 | sudokuDLX.solve(newBoard.board); 42 | System.out.println(sudokuDLX.solutions); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/History.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | import androidx.recyclerview.widget.LinearLayoutManager; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | 7 | import android.content.SharedPreferences; 8 | import android.os.Bundle; 9 | 10 | import org.litepal.LitePal; 11 | 12 | import java.util.Collection; 13 | import java.util.Collections; 14 | import java.util.List; 15 | 16 | public class History extends AppCompatActivity { 17 | private RecyclerView recyclerView; 18 | private RecyclerView.Adapter mAdapter; 19 | private RecyclerView.LayoutManager layoutManager; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_history); 25 | 26 | recyclerView = (RecyclerView) findViewById(R.id.history_recycler_view); 27 | recyclerView.setHasFixedSize(true); 28 | 29 | layoutManager = new LinearLayoutManager(this); 30 | recyclerView.setLayoutManager(layoutManager); 31 | // LitePal.findAll(GameRecord.class); 32 | SharedPreferences pref = getSharedPreferences("currentUser", MODE_PRIVATE); 33 | String name = pref.getString("name", ""); 34 | 35 | List gameRecords = LitePal.where("user = ?", name).find(GameRecord.class); 36 | Collections.reverse(gameRecords); 37 | mAdapter = new HistoryItemAdapter(gameRecords); 38 | recyclerView.setAdapter(mAdapter); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sudoku/dlx/dlxTest.java: -------------------------------------------------------------------------------- 1 | import dlx.*; 2 | 3 | public class dlxTest { 4 | public static void main(String[] args) { 5 | int[][] hardest = { 6 | {0,0,0,0,8,2,9,5,6}, 7 | {5,8,0,6,0,0,0,0,4}, 8 | {0,0,3,1,0,0,2,0,0}, 9 | {0,4,1,0,7,0,5,0,0}, 10 | {7,6,0,5,0,1,0,9,2}, 11 | {0,0,9,0,4,0,1,8,0}, 12 | {0,0,5,0,0,8,7,0,0}, 13 | {8,0,0,0,0,5,0,3,9}, 14 | {9,2,6,7,1,0,0,0,0} 15 | }; 16 | // 单纯解数独 17 | // 1. 实例化SudokuDLX(); 18 | // 2. sudoku.solve(int[][] board) 返回是否成功 19 | // 3. 如果成功则可以通过 sudoku.solutionBoard获得解出来的board,并通过soduku.solutions查看可能的解的个数 20 | // 4. 如果不成功则sudoku.solutionBoard为null 21 | SudokuDLX sudoku = new SudokuDLX(); 22 | 23 | if (sudoku.solve(hardest)) { 24 | System.out.println(sudoku.solutions); 25 | GenerateBoard.printBoard(sudoku.solutionBoard); 26 | } else { 27 | System.out.println("Invalid sudoku!"); 28 | } 29 | 30 | // 生成数独 31 | GenerateBoard newBoard = new GenerateBoard(); 32 | // 初始化一个棋盘,最开始随机放置了INITNUM个数字,然后开始解这个棋盘来得到终局,可以通过多次init来得到不同的终局 33 | newBoard.initBoard(); 34 | // 开始挖洞,level参数为挖掉的数目 35 | newBoard.run(50); 36 | // 打印棋盘 37 | newBoard.printBoard(); 38 | System.out.println(newBoard.actualLevel); 39 | SudokuDLX sudokuDLX = new SudokuDLX(); 40 | sudokuDLX.solve(newBoard.board); 41 | System.out.println(sudokuDLX.solutions); 42 | 43 | // 可用的一些方法 44 | // GenerateBoard 类方法以及实例方法 printBoard 打印一个棋盘 45 | // GenerateBoard.printBoard(newBoard.board); 46 | // 或 47 | // newBoard.printBoard(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable/ic_iconmonstr_light_bulb_18.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/java/com/example/sudoku/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.sudoku; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | import android.os.Bundle; 8 | import android.view.View; 9 | import android.widget.TextView; 10 | import android.widget.Toast; 11 | 12 | import com.google.android.material.button.MaterialButton; 13 | 14 | import org.litepal.LitePal; 15 | import org.w3c.dom.Text; 16 | 17 | public class MainActivity extends AppCompatActivity { 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | // LitePal.initialize(this); 23 | setContentView(R.layout.activity_main); 24 | // LitePal.getDatabase(); 25 | MaterialButton startGame = findViewById(R.id.materialButton4); 26 | startGame.setOnClickListener(new View.OnClickListener() { 27 | @Override 28 | public void onClick(View v) { 29 | Intent intent = new Intent(MainActivity.this, ChooseType.class); 30 | startActivity(intent); 31 | } 32 | }); 33 | 34 | MaterialButton checkHistory = findViewById(R.id.materialButton3); 35 | checkHistory.setOnClickListener(new View.OnClickListener() { 36 | @Override 37 | public void onClick(View v) { 38 | Intent intent = new Intent(MainActivity.this, History.class); 39 | startActivity(intent); 40 | } 41 | }); 42 | 43 | SharedPreferences pref = getSharedPreferences("currentUser", MODE_PRIVATE); 44 | String name = pref.getString("name", ""); 45 | if (name == "Anonymous") { 46 | Toast.makeText(getApplicationContext(), "你以匿名模式登录" + name, Toast.LENGTH_SHORT).show(); 47 | } else { 48 | Toast.makeText(getApplicationContext(), "欢迎来到数独世界~ " + name, Toast.LENGTH_SHORT).show(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SudokuApp-GS/Sudoku/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /Simple-sudoku-master/app/src/main/res/layout/item_choose_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 |