aboutsummaryrefslogtreecommitdiff
path: root/Chopsticks/cSharpVersion/FingerGameCSharp
diff options
context:
space:
mode:
authorSyndamia <kami02882@gmail.com>2019-04-16 16:23:03 +0300
committerSyndamia <kami02882@gmail.com>2019-04-16 16:23:03 +0300
commitc36dd556603ce6905066710497cd6d85488a3f0b (patch)
treea9755e840056b69c4b2220ebe35fda6f62756406 /Chopsticks/cSharpVersion/FingerGameCSharp
parent7f2aed65f77ab7477f53a5844ad031c6d603df8a (diff)
downloadShower-c36dd556603ce6905066710497cd6d85488a3f0b.tar
Shower-c36dd556603ce6905066710497cd6d85488a3f0b.tar.gz
Shower-c36dd556603ce6905066710497cd6d85488a3f0b.zip
Added the personal project Chopsticks with it's original logs
Diffstat (limited to 'Chopsticks/cSharpVersion/FingerGameCSharp')
-rw-r--r--Chopsticks/cSharpVersion/FingerGameCSharp/App.config6
-rw-r--r--Chopsticks/cSharpVersion/FingerGameCSharp/FingerGameCSharp.csproj53
-rw-r--r--Chopsticks/cSharpVersion/FingerGameCSharp/Program.cs85
-rw-r--r--Chopsticks/cSharpVersion/FingerGameCSharp/Properties/AssemblyInfo.cs36
4 files changed, 180 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+ </startup>
+</configuration> \ 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{BC7A1A20-429C-45B9-A0BF-4FDC22CED6F1}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>FingerGameCSharp</RootNamespace>
+ <AssemblyName>FingerGameCSharp</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ 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")]