From c36dd556603ce6905066710497cd6d85488a3f0b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 16 Apr 2019 16:23:03 +0300 Subject: Added the personal project Chopsticks with it's original logs --- Chopsticks/cSharpVersion/FingerGameCSharp.exe | Bin 0 -> 6144 bytes Chopsticks/cSharpVersion/FingerGameCSharp.sln | 25 ++++++ .../cSharpVersion/FingerGameCSharp/App.config | 6 ++ .../FingerGameCSharp/FingerGameCSharp.csproj | 53 +++++++++++++ .../cSharpVersion/FingerGameCSharp/Program.cs | 85 +++++++++++++++++++++ .../FingerGameCSharp/Properties/AssemblyInfo.cs | 36 +++++++++ Chopsticks/cSharpVersion/How to play.txt | 4 + 7 files changed, 209 insertions(+) create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp.exe create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp.sln create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp/App.config create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp/FingerGameCSharp.csproj create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp/Program.cs create mode 100644 Chopsticks/cSharpVersion/FingerGameCSharp/Properties/AssemblyInfo.cs create mode 100644 Chopsticks/cSharpVersion/How to play.txt (limited to 'Chopsticks/cSharpVersion') diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp.exe b/Chopsticks/cSharpVersion/FingerGameCSharp.exe new file mode 100644 index 0000000..f7453cb Binary files /dev/null and b/Chopsticks/cSharpVersion/FingerGameCSharp.exe differ diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp.sln b/Chopsticks/cSharpVersion/FingerGameCSharp.sln new file mode 100644 index 0000000..a8c5537 --- /dev/null +++ b/Chopsticks/cSharpVersion/FingerGameCSharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2050 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingerGameCSharp", "FingerGameCSharp\FingerGameCSharp.csproj", "{BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4ABD7B32-E0EE-465F-8E92-B97DD3A3B6F5} + EndGlobalSection +EndGlobal diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp/App.config b/Chopsticks/cSharpVersion/FingerGameCSharp/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/Chopsticks/cSharpVersion/FingerGameCSharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp/FingerGameCSharp.csproj b/Chopsticks/cSharpVersion/FingerGameCSharp/FingerGameCSharp.csproj new file mode 100644 index 0000000..cb72676 --- /dev/null +++ b/Chopsticks/cSharpVersion/FingerGameCSharp/FingerGameCSharp.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1} + Exe + FingerGameCSharp + FingerGameCSharp + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp/Program.cs b/Chopsticks/cSharpVersion/FingerGameCSharp/Program.cs new file mode 100644 index 0000000..15b61fa --- /dev/null +++ b/Chopsticks/cSharpVersion/FingerGameCSharp/Program.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FingerGameCSharp +{ + class Program + { + static void Main(string[] args) + { + int p1 = 1; + int p2 = 1; + int e1 = 1; + int e2 = 1; + int sel = 0; + + for (; ; ) + { + if (sel == 0) Console.WriteLine($"{e1} {e2}\r\n-----\r\n{p1} * {p2}\r\n"); + else Console.WriteLine($"{e1} * {e2}\r\n-----\r\n{p1} {p2}\r\n"); + + char yourHand = Console.ReadLine()[0]; + char toHand = Console.ReadLine()[0]; + Console.WriteLine(); + + if (sel == 0) + { + if (yourHand == 'l' && p1 != 5) + { + if (toHand == 'l' && e1 != 5) e1 += p1; + else if (toHand == 'r' && e2 != 5) e2 += p1; + sel = 1; + } + else if (yourHand == 'r' && p2 != 5) + { + if (toHand == 'l' && e1 != 5) { e1 += p2; sel = 1; } + else if (toHand == 'r' && e2 != 5) { e2 += p2; sel = 1; } + else Console.WriteLine("Please select valid enemy hand! (You will have to reselect your hand too!)"); + } + else + { + Console.WriteLine("Please select a valid hand!"); + } + } + else + { + if (yourHand == 'l' && e1 != 5) + { + if (toHand == 'l' && p1 != 5) { p1 += e1; sel = 0; } + else if (toHand == 'r' && p2 != 5) { p2 += e1; sel = 0; } + else Console.WriteLine("Please select valid enemy hand! (You will have to reselect your hand too!)"); + } + else if (yourHand == 'r' && e2 != 5) + { + if (toHand == 'l' && p1 != 5) { p1 += e2; sel = 0; } + else if (toHand == 'r' && p2 != 5) { p2 += e2; sel = 0; } + else Console.WriteLine("Please select valid enemy hand! (You will have to reselect your hand too!)"); + } + else + { + Console.WriteLine("Please select a valid hand!"); + } + + } + + if (p1 == 5 && p2 == 5) + { + Console.WriteLine("Player 2 wins! New game."); + p1 = 1; p2 = 1; e1 = 1; e2 = 1; + sel = 0; + } + else if (e1 == 5 && e2 == 5) + { + Console.WriteLine("Player 1 wins! New game."); + p1 = 1; p2 = 1; e1 = 1; e2 = 1; + sel = 1; + } + + Console.WriteLine(); + } + } + } +} diff --git a/Chopsticks/cSharpVersion/FingerGameCSharp/Properties/AssemblyInfo.cs b/Chopsticks/cSharpVersion/FingerGameCSharp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..df1af1c --- /dev/null +++ b/Chopsticks/cSharpVersion/FingerGameCSharp/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("FingerGameCSharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("FingerGameCSharp")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("bc7a1a20-429c-45b9-a0bf-4fdc22ced6f1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chopsticks/cSharpVersion/How to play.txt b/Chopsticks/cSharpVersion/How to play.txt new file mode 100644 index 0000000..035f3df --- /dev/null +++ b/Chopsticks/cSharpVersion/How to play.txt @@ -0,0 +1,4 @@ +-type l or r to select your right or left hand +-type l or r to select which enemy hand you want to add fingers to +!all hands to the left side of the screen are l, all to the right are r +star * shows who's turn it is \ No newline at end of file -- cgit v1.2.3