├── .gitignore ├── ConsoleTetris.sln ├── ConsoleTetris ├── Block.h ├── Console.h ├── ConsoleTetris.vcxproj ├── ConsoleTetris.vcxproj.filters ├── Define.h ├── Game.cpp ├── Ini.h └── UI.h ├── ConsoleTetrisArchiveEditor ├── ConsoleTetrisArchiveEditor.vcxproj ├── ConsoleTetrisArchiveEditor.vcxproj.filters ├── Define.h ├── Main.cpp └── UI.h ├── LICENSE ├── README.md ├── images ├── 2022-08-11.png ├── image-20220811192937137.png ├── image-20220811193155482.png ├── image-20220811194408748.png ├── image-20220811194602059.png ├── image-20220811194758729.png ├── image-20220811194834629.png ├── image-20220811195148665.png ├── image-20220811195252586.png ├── image-20220811195438523.png ├── image-20220811195512739.png ├── image-20220811195553203.png ├── image-20220811200021365.png ├── image-20220811200106728.png ├── image-20220811200314746.png ├── image-20220811200601564.png └── image-20220811201206457.png ├── sound ├── bomb.wav ├── clear.wav ├── land.wav └── rotate.wav └── 控制台俄罗斯方块用户手册.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | *.ini 332 | GameData.dat 333 | -------------------------------------------------------------------------------- /ConsoleTetris.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.106 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleTetris", "ConsoleTetris\ConsoleTetris.vcxproj", "{E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleTetrisArchiveEditor", "ConsoleTetrisArchiveEditor\ConsoleTetrisArchiveEditor.vcxproj", "{8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Debug|x64.ActiveCfg = Debug|x64 19 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Debug|x64.Build.0 = Debug|x64 20 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Debug|x86.ActiveCfg = Debug|Win32 21 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Debug|x86.Build.0 = Debug|Win32 22 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Release|x64.ActiveCfg = Release|x64 23 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Release|x64.Build.0 = Release|x64 24 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Release|x86.ActiveCfg = Release|Win32 25 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8}.Release|x86.Build.0 = Release|Win32 26 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Debug|x64.ActiveCfg = Debug|x64 27 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Debug|x64.Build.0 = Debug|x64 28 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Debug|x86.ActiveCfg = Debug|Win32 29 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Debug|x86.Build.0 = Debug|Win32 30 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Release|x64.ActiveCfg = Release|x64 31 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Release|x64.Build.0 = Release|x64 32 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Release|x86.ActiveCfg = Release|Win32 33 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {14166B53-2C0C-46DC-A49E-19E8A63A4960} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /ConsoleTetris/Block.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/Block.h -------------------------------------------------------------------------------- /ConsoleTetris/Console.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/Console.h -------------------------------------------------------------------------------- /ConsoleTetris/ConsoleTetris.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {E62ADC81-CD38-4F4A-BEC5-6FB78EECC2A8} 32 | Win32Proj 33 | ConsoleTetris 34 | 10.0 35 | 36 | 37 | 38 | Application 39 | true 40 | v142 41 | Unicode 42 | 43 | 44 | Application 45 | false 46 | v142 47 | true 48 | Unicode 49 | 50 | 51 | Application 52 | true 53 | v142 54 | Unicode 55 | 56 | 57 | Application 58 | false 59 | v142 60 | true 61 | Unicode 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | true 83 | $(IncludePath) 84 | 85 | 86 | true 87 | 88 | 89 | false 90 | $(IncludePath) 91 | 92 | 93 | false 94 | 95 | 96 | 97 | 98 | 99 | Level3 100 | Disabled 101 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 102 | true 103 | 104 | 105 | Console 106 | true 107 | 108 | 109 | 110 | 111 | 112 | 113 | Level3 114 | Disabled 115 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 116 | true 117 | 118 | 119 | Console 120 | true 121 | 122 | 123 | 124 | 125 | Level3 126 | 127 | 128 | MaxSpeed 129 | true 130 | true 131 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 132 | true 133 | 134 | 135 | Console 136 | true 137 | true 138 | true 139 | 140 | 141 | 142 | 143 | Level3 144 | 145 | 146 | MaxSpeed 147 | true 148 | true 149 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 150 | true 151 | 152 | 153 | Console 154 | true 155 | true 156 | true 157 | 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /ConsoleTetris/ConsoleTetris.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 头文件 20 | 21 | 22 | 头文件 23 | 24 | 25 | 头文件 26 | 27 | 28 | 头文件 29 | 30 | 31 | 32 | 33 | 源文件 34 | 35 | 36 | -------------------------------------------------------------------------------- /ConsoleTetris/Define.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/Define.h -------------------------------------------------------------------------------- /ConsoleTetris/Game.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/Game.cpp -------------------------------------------------------------------------------- /ConsoleTetris/Ini.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/Ini.h -------------------------------------------------------------------------------- /ConsoleTetris/UI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetris/UI.h -------------------------------------------------------------------------------- /ConsoleTetrisArchiveEditor/ConsoleTetrisArchiveEditor.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {8D35EE28-EA8F-4D82-AAD4-759D10F8E83E} 24 | ConsoleTetrisArchiveEditor 25 | 10.0 26 | 27 | 28 | 29 | Application 30 | true 31 | v142 32 | MultiByte 33 | 34 | 35 | Application 36 | false 37 | v142 38 | true 39 | MultiByte 40 | 41 | 42 | Application 43 | true 44 | v142 45 | MultiByte 46 | 47 | 48 | Application 49 | false 50 | v142 51 | true 52 | MultiByte 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Level3 76 | Disabled 77 | true 78 | true 79 | 80 | 81 | 82 | 83 | Level3 84 | Disabled 85 | true 86 | true 87 | 88 | 89 | 90 | 91 | Level3 92 | MaxSpeed 93 | true 94 | true 95 | true 96 | true 97 | 98 | 99 | true 100 | true 101 | 102 | 103 | 104 | 105 | Level3 106 | MaxSpeed 107 | true 108 | true 109 | true 110 | true 111 | 112 | 113 | true 114 | true 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /ConsoleTetrisArchiveEditor/ConsoleTetrisArchiveEditor.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 头文件 20 | 21 | 22 | 头文件 23 | 24 | 25 | 26 | 27 | 源文件 28 | 29 | 30 | -------------------------------------------------------------------------------- /ConsoleTetrisArchiveEditor/Define.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetrisArchiveEditor/Define.h -------------------------------------------------------------------------------- /ConsoleTetrisArchiveEditor/Main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetrisArchiveEditor/Main.cpp -------------------------------------------------------------------------------- /ConsoleTetrisArchiveEditor/UI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/ConsoleTetrisArchiveEditor/UI.h -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 zhongyang219 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ConsoleTetris 2 | 这是一个基于Windows控制台的俄罗斯方块游戏。 3 | 4 | 它除了提供基本俄罗斯方块游戏以外,还有双人模式、隐形模式、道具系统、键位设置、界面宽度设置等功能。 5 | 6 | 这是我的早期作品之一,编写于2016年6月,完成于2016年10月。 7 | 8 | # 用户手册 9 | 10 | ## 主界面说明 11 | 12 | ![image-20220811192937137](images/image-20220811192937137.png) 13 | 14 | ## 按键说明 15 | 16 | ![image-20220811193155482](images/image-20220811193155482.png) 17 | 18 | ## 得分与等级 19 | 20 | 在本游戏中,消除任意行数可以增加游戏得分。消除的行数和得分的关系如下表所示: 21 | 22 | | 消除的行数 | 增加的得分 | 23 | | ---------- | ---------- | 24 | | 1 | 1 | 25 | | 2 | 3 | 26 | | 3 | 5 | 27 | | 4 | 8 | 28 | 29 | 当得分增加到一定值的时候,会使得等级提升(选项设置中可以指定提升 1 个等级所需要的得分,详 见下面“选项设置”小节),如果选项设置中设置为允许升级的话。 30 | 31 | 在本游戏中,等级会决定方块下落的速度,等级为 1 级时方块下落的速度 最慢,等级越高,方块下落的速度就越快。当等级达到 9 级时,方块下落的速 度已经达到最快,此时等级再提升将不会改变方块下落的速度。 32 | 33 | ## 游戏结束 34 | 35 | 当新的方块在界面的最上方生成的时候,如果它所在的位置已经被原有的 方块占据,则被判定为游戏结束。游戏结束时会显示如下界面: 36 | 37 | ![image-20220811194408748](images/image-20220811194408748.png) 38 | 39 | 此时按Y键将重新开始游戏,按N键退出程序。 40 | 41 | ## 游戏暂停 42 | 43 | 在游戏过程中按下回车键将进入暂停状态,如右图所示。此时,可以按下S、L和O键实现保存进度、载入进度和选项设置功能。 44 | 45 | ![image-20220811194602059](images/image-20220811194602059.png) 46 | 47 | 处于暂停状态时,按回车键或ESC键将返回游戏。 48 | 49 | ## 保存与载入进度 50 | 51 | 游戏提供了保存和载入数据的功能。要进行保存或载入进度,先按回车键进入暂停状态,如上图所示。 52 | 53 | ### 保存进度 54 | 55 | 在暂停状态下,按下键盘上的S键后,界面显示“已保存”,此时,游戏的进度、得分和各种选项设置将会被保存到游戏主程序所在目录下面名为“GameData.dat”的文件里。如果不存在此文件,则此文件会被自动创建。 56 | 57 | ### 载入进度 58 | 59 | 在暂停状态下,按下键盘上的L键将载入游戏主程序所在目录下“GameData.dat”文件中的游戏数据。载入后游戏界面显示“已载入”。 60 | 在执行了保存或载入操作后按回车键或ESC键返回游戏。 61 | 62 | ## 选项设置 63 | 64 | 要进入选项设置,在游戏过程中按回车键进入暂停状态,此时下键盘上的O键将进入选项设置。 65 | 选项设置界面如下图所示: 66 | 67 | ![image-20220811194758729](images/image-20220811194758729.png) 68 | 69 | 在选项设置界面按上下方向键可以切换选中的项目。其中当选中的项目为第2项或第4时,按下回车键或右方向键后将出现一个闪烁的光标: 70 | 71 | ![image-20220811194834629](images/image-20220811194834629.png) 72 | 73 | 此时需要从键盘输入一个数字来设置对应选项的数值,输入之后按回车键。 74 | 75 | 注:当出现闪烁光标时,必须从键盘输入一个数字,此时按ESC键不能返回。 76 | 当选中的项目为第1、3、5、6、7项时,按回车键或右方向键可以依次在可以设置的选项中切换。 77 | 78 | ### 显示消除动画 79 | 80 | 将此选项设置为“是”时,如果游戏中出现了可消除的行,将会提供一个逐个格子消除的动画效果。将此选项设置为“否”时,如果出现可消除的行,则该行直接消失。 81 | 82 | ### 消除动画间隔时间 83 | 84 | 此选项用来设置消除动画效果的快慢。这个选项的设置值代表了消除一行时,消除第一个格子所花的时间,此数值设置的越大,消除动画的速度就越慢,反之则越快。它的可允许设定值为5~9999毫秒之间。它的默认值是40毫秒。 85 | 86 | ### 允许升级 87 | 88 | 此选项用来设置是否允许升级。 89 | 将此选项设置为“是”时,增加得分会使得等级提升;如果将此选项设置为“否”,则等级将一直是1级,不会提升。同时,主界面中的等级信息将不显示。 90 | 注:如果等级已经超过1级了,将此选项从“是”更改为“否”的话,等级会直接变为1级,将此选项更改为“是”后恢复原来的等级。 91 | 92 | ### 提升1级所需的得分 93 | 94 | 此选项用来设置等级每提升1级所需的得分。 95 | 此选项的值设置得越大,等级的提升就越困难,同时,方块下落速度的提升也会变得越慢,获得更高的得分也会变得越容易; 96 | 此选项的值设置得越小,等级的提升就越容易,但是方块下落速度的提升就会越快,获得更高的得分将变得越困难。 97 | 此选项的设定值不允许小于1。 98 | 注:本游戏中等级的计算方法为:等级 = 得分/提升1级所需的得分 + 1。 99 | 100 | ### 退出时自动存档 101 | 102 | 将此选项设置为“是”时,按ESC键退出游戏前会自动执行一次保存操作。 103 | 注:鼠标点击游戏窗口右上角的关闭按钮退出游戏将不会自动保存。 104 | 105 | ### 隐形模式 106 | 107 | 将此选项设置为“是”时游戏将进入隐形模式,将此选项设置为“否”时将退出隐形模式。详细内容参见下面“隐形模式”小节。 108 | 109 | ### 隐形模式难度 110 | 111 | 此选项用于设置隐形模式下游戏的难度,有“低”、“中”、“高”三种难度可选。详细内容参见下面“隐形模式”小节。 112 | 113 | ### 方块颜色设置 114 | 115 | 选择此选项将进入方块颜色设置的二级菜单,如图所示: 116 | 117 | ![image-20220811195148665](images/image-20220811195148665.png) 118 | 119 | 此选项可以自由定义7种俄罗斯方块的颜色,总共有白色、红色、绿色、蓝色、黄色、蓝绿色、紫色和灰色8种颜色可选。 120 | 在方块颜色设置中,按上下方块切换选中的项目,按左右方向键可以切换选中项目的颜色。选择最后一项“恢复默认颜色”时,按回车键或右方向键可以恢复成默认的颜色。 121 | 按ESC键将返回上一级菜单。 122 | 注:更改了方块颜色设置时,当前方块和下一个方块的颜色都不会改变,从下下一个方块开始,方块的颜色才会变为设置的颜色。 123 | 124 | ### 键位设置 125 | 126 | 选择此选项将进入键位设置二级菜单,如图所示: 127 | 128 | ![image-20220811201206457](images/image-20220811201206457.png) 129 | 130 | 使用上下方向键选择对应的项,按下回车键设之后,按下要设置的键设置键位。 131 | 132 | ### 双人模式 133 | 134 | 将此选项设置为“是”时,将开启双人模式,可允许两名玩家同时游戏。关于双人模式的说明请参照下面的“双人模式”章节。 135 | 136 | ### 界面宽度 137 | 138 | 此选项可以设置界面的宽度。选中此选项后按下回车键,输入要设置的界面宽度,按下回车键即可。界面宽度可允许设置的范围为10~20。 139 | 140 | 如果新的界面大于原来的界面宽度,则界面会向右侧扩展。 141 | 142 | 如果新的界面小于原来的宽度,则界面右侧多余的列会被隐藏。 143 | 144 | 注意:如果更改界面宽度后出现了可消除的行,则这些行会被立刻消除,同时界面右侧不可见的列将保持不变。 145 | 146 | ### 游戏音效 147 | 148 | 开启此选项后,在方块移动、旋转、下落,以及消除行时会有相应的音效。 149 | 150 | ## 道具系统 151 | 152 | 本游戏中提供的道具共有3种:长条、炸弹和穿甲弹。获得道具后会在界面左侧显示出来,如下图所示: 153 | 154 | ![image-20220811195252586](images/image-20220811195252586.png) 155 | 156 | ### 道具的获得 157 | 158 | 在游戏中,每消除任意行数会有一定的概率随机获得一个道具,消除的行数和获得道具的概率的对应关系如下表所示: 159 | 160 | | 消除的行数 | 获得一个道具概率 | 161 | | ---------- | ---------------- | 162 | | 1 | 10% | 163 | | 2 | 25% | 164 | | 3 | 50% | 165 | | 4 | 100% | 166 | 167 | ### 道具的使用 168 | 169 | 按下键盘上的数字1、2、3键分别使用长条、炸弹和穿甲弹道具。使用后,下一个方块将变成使用的道具(当前方块并不会变化)。如下图所示:(注:如果下一个方块已经是要使用的道具,则不会使用道具,相应道具的数量不会减少。) 170 | 171 | ![image-20220811195438523](images/image-20220811195438523.png) 172 | 173 | ### 炸弹道具 174 | 175 | 炸弹道具将会消除它所在下方的一个4x4的区域。如下图所示: 176 | 177 | ![image-20220811195512739](images/image-20220811195512739.png) 178 | 179 | ### 穿甲弹道具 180 | 181 | 穿甲弹道具将无视遮挡,下落到它所在列的最下方的一个空的格子中并将其填充。 182 | 如下图所示: 183 | 184 | ![image-20220811195553203](images/image-20220811195553203.png) 185 | 186 | ## 隐形模式 187 | 188 | 隐形模式为本游戏中难度较大的模式,在隐形模式下,下方的方块将不可见,玩家只能通过记忆来判断方块应该下落的位置。 189 | 190 | ![image-20220811200021365](images/image-20220811200021365.png) 191 | 192 | 但是在不同的难度下,下方方块可以在特定的时候显示一段时间。 193 | 要进入隐形模式,请在选项设置中将“隐形模式”一项设置为“开”。选项设置的详细操作方法请参见上面“选项设置”小节。 194 | 隐形模式共有3种不同的难度模式可供选择,分别为“低”、“中”、“高”。在选项设置中可以设置隐形模式的难度。如下图所示。选项设置的操作方法请参见上面“选项设置”小节。 195 | 196 | ![image-20220811200106728](images/image-20220811200106728.png) 197 | 198 | ### 低难度模式 199 | 200 | 选项设置中将“隐形模式难度”设置为“低”时即为此模式。在此模式下,方块每次下落的瞬间都会显示一次下方的方块,时间持续500毫秒。如图下所示: 201 | 202 | ![image-20220811200314746](images/image-20220811200314746.png) 203 | 204 | 注:如果选项设置中开启了“显示消除动画”,则当有消除行时,显示消除动画将获得更长的显示下方方块的时间。 205 | 206 | ### 中难度模式 207 | 208 | 选项设置中将“隐形模式难度”设置为“中”时即为此模式。在此模式下,只有在有消除行时才显示下方方块,在消除动画前会有500毫秒的停顿时间。 209 | 210 | ### 高难度模式 211 | 212 | 选项设置中将“隐形模式难度”设置为“高”时即为此模式。在此模式下,任何时候都不会显示下方方块,直到游戏结束为止。在此模式下,如果选项设置中将“显示消除动画”设置为“是”,则在有消除行时会显示当前消除的行,并显示消除动画,如下图所示。 213 | 214 | ![image-20220811200601564](images/image-20220811200601564.png) 215 | 216 | ## 双人模式 217 | 218 | 开启双人模式后允许两名玩家同时游戏。如下图所示: 219 | 220 | ![2022-08-11](images/2022-08-11.png) 221 | 222 | 在此模式下,两名玩家将分别控制一个方块。方块在落地前互不干扰。 223 | 224 | -------------------------------------------------------------------------------- /images/2022-08-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/2022-08-11.png -------------------------------------------------------------------------------- /images/image-20220811192937137.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811192937137.png -------------------------------------------------------------------------------- /images/image-20220811193155482.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811193155482.png -------------------------------------------------------------------------------- /images/image-20220811194408748.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811194408748.png -------------------------------------------------------------------------------- /images/image-20220811194602059.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811194602059.png -------------------------------------------------------------------------------- /images/image-20220811194758729.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811194758729.png -------------------------------------------------------------------------------- /images/image-20220811194834629.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811194834629.png -------------------------------------------------------------------------------- /images/image-20220811195148665.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811195148665.png -------------------------------------------------------------------------------- /images/image-20220811195252586.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811195252586.png -------------------------------------------------------------------------------- /images/image-20220811195438523.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811195438523.png -------------------------------------------------------------------------------- /images/image-20220811195512739.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811195512739.png -------------------------------------------------------------------------------- /images/image-20220811195553203.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811195553203.png -------------------------------------------------------------------------------- /images/image-20220811200021365.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811200021365.png -------------------------------------------------------------------------------- /images/image-20220811200106728.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811200106728.png -------------------------------------------------------------------------------- /images/image-20220811200314746.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811200314746.png -------------------------------------------------------------------------------- /images/image-20220811200601564.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811200601564.png -------------------------------------------------------------------------------- /images/image-20220811201206457.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/images/image-20220811201206457.png -------------------------------------------------------------------------------- /sound/bomb.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/sound/bomb.wav -------------------------------------------------------------------------------- /sound/clear.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/sound/clear.wav -------------------------------------------------------------------------------- /sound/land.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/sound/land.wav -------------------------------------------------------------------------------- /sound/rotate.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/sound/rotate.wav -------------------------------------------------------------------------------- /控制台俄罗斯方块用户手册.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhongyang219/ConsoleTetris/183dc73cc877615329bc5c6835fc59dab3c5effc/控制台俄罗斯方块用户手册.pdf --------------------------------------------------------------------------------