diff --git a/ChuNiZiMu/ChuNiZiMu.csproj b/ChuNiZiMu/ChuNiZiMu.csproj index 5989aad..efc6aec 100644 --- a/ChuNiZiMu/ChuNiZiMu.csproj +++ b/ChuNiZiMu/ChuNiZiMu.csproj @@ -11,7 +11,7 @@ x64;arm64 win-x64 true - 0.1.2 + 0.2.0 Misaka Castle (C)Copyright 2018-2024 Misaka Castle and Project Chunizimu contributors. All rights reserved. diff --git a/ChuNiZiMu/Program.cs b/ChuNiZiMu/Program.cs index 400d98c..50f5c47 100644 --- a/ChuNiZiMu/Program.cs +++ b/ChuNiZiMu/Program.cs @@ -54,6 +54,10 @@ private static void GameInit(string[] args) "This should be set true when and ONLY when just using this tool as a game backend manager, instead of a game player. (Y/n)"); bool showCorrectAnswers = (Console.ReadLine() ?? string.Empty).Trim().ToLower() != "n"; + Console.WriteLine("Add the revealed letter EVEN THOUGH the letter doesn't exist in any song title?\n" + + "By enabling this feature, the revealed letter list will act better as a hint list, which was widely used in the real game chat before. (Y/n)"); + bool preserveAnyRevealedLetter = (Console.ReadLine() ?? string.Empty).Trim().ToLower() != "n"; + Console.WriteLine("Please check the following song list for the game session:"); for (int i = 0; i < songs.Count; i++) { @@ -67,13 +71,14 @@ private static void GameInit(string[] args) Console.WriteLine($"If check correct, press any key to start the game session. ({songs.Count} songs)"); Console.ReadKey(true); - GameMain(songs, showCorrectAnswers); + GameMain(songs, revealSpacesInitially, showCorrectAnswers, preserveAnyRevealedLetter); } - private static void GameMain(IReadOnlyList songs, bool showCorrectAnswers) + private static void GameMain(IReadOnlyList songs, bool revealSpacesInitially, bool showCorrectAnswers, bool preserveAnyRevealedLetter) { bool gameFinished = false; var revealedChars = new HashSet(); + if (revealSpacesInitially) revealedChars.Add("<空格>"); var stopwatch = Stopwatch.StartNew(); for (int round = 1; ; round++) { @@ -164,14 +169,22 @@ private static void GameMain(IReadOnlyList songs, bool showCorrectAnswers) gameFinished = true; continue; // directly continue to show the game final result } + string shownLetter = letter == ' ' ? "<空格>" : letter.ToString(); + if (revealedChars.Contains(letter.ToString()) || (letter == ' ' && revealedChars.Contains("<空格>"))) + { + Console.WriteLine($"The letter {shownLetter} has already been revealed. Any key continue."); + Console.ReadKey(true); + continue; + } if (revealResult.All(result => result != RevealResult.Success) && revealResult.Any(result => result == RevealResult.NotInTitle)) { // 没有成功的记录,并且至少有一个报错“不在标题中” - Console.WriteLine($"The letter {letter} is not in any song title. Any key continue."); + Console.WriteLine($"The letter {shownLetter} is not in any song title. Any key continue."); Console.ReadKey(true); + if (preserveAnyRevealedLetter) revealedChars.Add(shownLetter); continue; - } - revealedChars.Add(letter == ' ' ? "<空格>" : letter.ToString()); + } + revealedChars.Add(shownLetter); } #endregion } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cc93a3e --- /dev/null +++ b/LICENSE @@ -0,0 +1,51 @@ +123 Open-Source Organization MIT Public License v2.0 + + + +Copyright (C) 2015-2024 123 Open-Source Organization and related group Misaka Castle + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + + +1. If you want to use the Software which is any-person-accessable, you can public or not public the Software by any way. + + + +2. If you want to use the Software which only give access to some people, you can use the Software without limit, but you should not public the Software by any way including: + + + + Sharing with other persons who don't allowed to access the Software; + + Distributing the raw Software without grants + + + +or the Software copyright owner have the right to take legal actions, includes but not limited to: + + + + Require you to stop using the Software and/or the modified Software; + + Require you to apologize your action and publish it; + + Recover the income from the Software and/or the modified Software + + + +and/or achieve the requirements and the rights by filing lawsuits. + + + +3. If you want to use the Software which only give access to some people and is expressly prohibited to modify the Software, you should obey the notice in section 2 and the following notice: + + + + Never modify it for any reasons, including repairing bugs(if this happens, you should submit an issue in the source of the Software,like Github, Gitlab or E-mail instead of repairing bugs by yourself). + + + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..db6e372 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Chu Ni Zi Mu +音游开字母辅助工具(Music Rhythm Game Title-Revealing Game Assistant) + +## How to use +Just download the latest release and run it. +**For ARM64 users: Due to the reason that JetBrains Rider hasn't supported to build for ARM64 platform using Native AOT, the ARM64 version of ChuNiZiMu is dependent on .NET 8 runtime. You need to install .NET 8 runtime before running ChuNiZiMu on ARM64 platform.** + +**For Qihoo 360 users: Although in fact that ChuNiZiMu contains no malicious code(s), sometimes Qihoo 360 may report ChuNiZiMu as a false-positively trojan virus. This may because of the .NET 8 native AOT compilation. You can add ChuNiZiMu to the white list of Qihoo 360 to solve this problem.** + +## License +Licensed under [123 Open-Source Organization MIT Public License 2.0](LICENSE). \ No newline at end of file