Browse Source

initial

master
2 1 month ago
parent
commit
c991e78515
  1. 2
      .gitignore
  2. 34
      ClassLib000/Chess/ChessGame.cs
  3. 9
      ClassLib000/Chess/Enum/EColor.cs
  4. 10
      ClassLib000/Chess/Enum/EFigureType.cs
  5. 41
      ClassLib000/Chess/Figure.cs
  6. 55
      ClassLib000/Chess/Player.cs
  7. 62
      ClassLib000/Chess/description.txt
  8. 7
      ClassLib000/ClassLib000.csproj
  9. 26
      ClassLib000/TestModel/Class1.cs
  10. 62
      ClassLib000/Walker/description.txt
  11. 8
      ClassLibrary1/Class1.cs
  12. 7
      ClassLibrary1/ClassLibrary1.csproj
  13. 49
      ConsoleApp1.sln
  14. 20
      ConsoleApp1/ConsoleApp1.csproj
  15. 12
      ConsoleApp1/Program.cs
  16. 6
      ConsoleApp2/App.config
  17. 59
      ConsoleApp2/ConsoleApp2.csproj
  18. 132
      ConsoleApp2/Program.cs
  19. 36
      ConsoleApp2/Properties/AssemblyInfo.cs
  20. 47
      ConsoleCore/ChessConsoler.cs
  21. 20
      ConsoleCore/ConsoleCore.csproj
  22. 117
      ConsoleCore/Program.cs

2
.gitignore

@ -388,3 +388,5 @@ FodyWeavers.xsd
.idea/ .idea/
*.sln.iml *.sln.iml
Build/

34
ClassLib000/Chess/ChessGame.cs

@ -0,0 +1,34 @@
using System;
namespace ClassLib000.Chess
{
/// <summary>
/// Игра
/// </summary>
public class ChessGame
{
public Player WhitePlayer;
public Player BlackPlayer;
#region constructors
public ChessGame(bool bInit = true)
{
WhitePlayer = new Player();
BlackPlayer = new Player();
if (bInit)
{
Init();
}
}
#endregion
#region public methods
public void Init()
{
WhitePlayer.Init(EColor.White);
BlackPlayer.Init(EColor.Black);
}
#endregion
}
}

9
ClassLib000/Chess/Enum/EColor.cs

@ -0,0 +1,9 @@
namespace ClassLib000.Chess
{
public enum EColor
{
Unknown = 0,
Black = 1,
White = 2
}
}

10
ClassLib000/Chess/Enum/EFigureType.cs

@ -0,0 +1,10 @@
namespace ClassLib000.Chess
{
public enum EFigureType
{
Unknown = 0,
Пешка = 1,
Конь = 2,
Ладья = 3,
}
}

41
ClassLib000/Chess/Figure.cs

@ -0,0 +1,41 @@
namespace ClassLib000.Chess
{
/// <summary>
/// Фигура
/// </summary>
public class Figure
{
#region public fields
/// <summary>
/// Тип фигуры
/// </summary>
public EFigureType Type;
/// <summary>
/// Цвет фигуры
/// </summary>
public EColor Color;
/// <summary>
/// Позиция
/// </summary>
public int X;
/// <summary>
/// Позиция
/// </summary>
public int Y;
/// <summary>
/// Срублена ли фигура
/// </summary>
public bool IsBroken;
#endregion
public Figure(EColor enColor, EFigureType type, int x, int y)
{
this.Type = type;
this.Color = enColor;
this.X = x;
this.Y = y;
}
}
}

55
ClassLib000/Chess/Player.cs

@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassLib000.Chess
{
public class Player
{
public Figure Пешка1;
public Figure Пешка2;
public Figure Пешка3;
public Figure Пешка4;
public Figure Пешка5;
public Figure Пешка6;
public Figure Пешка7;
public Figure Пешка8;
public Figure Ладья1;
public Figure Ладья2;
public Figure Конь1;
public Figure[] GetBrokenFigures()
{
// TODO:
return new Figure[0];
}
public Figure Конь2;
// TODO: ... //
#region methods
internal void Init(EColor enColor)
{
this.Пешка1 = new Figure(enColor, EFigureType.Пешка, 1, enColor == EColor.White ? 2 : 7);
this.Пешка2 = new Figure(enColor, EFigureType.Пешка, 2, enColor == EColor.White ? 2 : 7);
this.Пешка3 = new Figure(enColor, EFigureType.Пешка, 3, enColor == EColor.White ? 2 : 7);
this.Пешка4 = new Figure(enColor, EFigureType.Пешка, 4, enColor == EColor.White ? 2 : 7);
this.Пешка5 = new Figure(enColor, EFigureType.Пешка, 5, enColor == EColor.White ? 2 : 7);
this.Пешка6 = new Figure(enColor, EFigureType.Пешка, 6, enColor == EColor.White ? 2 : 7);
this.Пешка7 = new Figure(enColor, EFigureType.Пешка, 7, enColor == EColor.White ? 2 : 7);
this.Пешка8 = new Figure(enColor, EFigureType.Пешка, 8, enColor == EColor.White ? 2 : 7);
this.Ладья1 = new Figure(enColor, EFigureType.Ладья, 1, enColor == EColor.White ? 1 : 8);
this.Ладья2 = new Figure(enColor, EFigureType.Ладья, 8, enColor == EColor.White ? 1 : 8);
this.Конь1 = new Figure(enColor, EFigureType.Конь, 2, enColor == EColor.White ? 1 : 8);
this.Конь2 = new Figure(enColor, EFigureType.Конь, 7, enColor == EColor.White ? 1 : 8);
// TODO: ... //
}
#endregion
}
}

62
ClassLib000/Chess/description.txt

@ -0,0 +1,62 @@
# Файл с описанием классов предметной области Шахматы (ПСБ-252)
## Вариант 1
Отображение шахматной доски и таймера времени
### Что храним
- ход[] (история ходов)
- номер
- обозначение хода белых (строка)
- обозначение хода черных (строка)
- игрок белый
- фигуры активные
- фигуры срубленные
- таймер
- игрок черный
- фигуры активные
- фигуры срубленные
- таймер (осталось секунд)
- фигура
- тип
- цвет
- позиция
- позиция
- X (1-8)
- Y (1-8)
### Сценарии
- отобразить текущее состояние доски
- отобразить текущее список ходов
- отобразить текущее список срубленных фигур
- отобразить время на таймерах
- добавить ход: откуда, куда
- убрать фигуру (срубить): где
## Вариант 2
Отображение шахматной доски
### Что храним
- игра
- игрок белый
- игрок черный
- игрок белый
- фигуры
- игрок черный
- фигуры
- фигура
- тип
- цвет
- позиция
- флаг срублена
- позиция
- X (1-8)
- Y (1-8)
### Сценарии
- отобразить текущее состояние доски
- отобразить текущее список срубленных фигур
- добавить ход: откуда, куда
- убрать фигуру (срубить): где
- отобразить шахматную ситуацию: фигур[]

7
ClassLib000/ClassLib000.csproj

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

26
ClassLib000/TestModel/Class1.cs

@ -0,0 +1,26 @@
using System;
namespace ClassLib000.TestModel
{
public class Car
{
private const int MaxAge = 20;
public string PlateNumber;
public string Color;
public int AgeYears = default(int);
private bool AgedEnough = false;
public void PassYear()
{
if (!AgedEnough)
{
this.AgeYears++;
}
if (AgeYears > MaxAge)
{
AgedEnough = true;
}
}
}
}

62
ClassLib000/Walker/description.txt

@ -0,0 +1,62 @@
# Файл с описанием классов предметной области Шахматы (ПСБ-252)
## Вариант 1
Отображение шахматной доски и таймера времени
### Что храним
- ход[] (история ходов)
- номер
- обозначение хода белых (строка)
- обозначение хода черных (строка)
- игрок белый
- фигуры активные
- фигуры срубленные
- таймер
- игрок черный
- фигуры активные
- фигуры срубленные
- таймер (осталось секунд)
- фигура
- тип
- цвет
- позиция
- позиция
- X (1-8)
- Y (1-8)
### Сценарии
- отобразить текущее состояние доски
- отобразить текущее список ходов
- отобразить текущее список срубленных фигур
- отобразить время на таймерах
- добавить ход: откуда, куда
- убрать фигуру (срубить): где
## Вариант 2
Отображение шахматной доски
### Что храним
- игра
- игрок белый
- игрок черный
- игрок белый
- фигуры
- игрок черный
- фигуры
- фигура
- тип
- цвет
- позиция
- флаг срублена
- позиция
- X (1-8)
- Y (1-8)
### Сценарии
- отобразить текущее состояние доски
- отобразить текущее список срубленных фигур
- добавить ход: откуда, куда
- убрать фигуру (срубить): где
- отобразить шахматную ситуацию: фигур[]

8
ClassLibrary1/Class1.cs

@ -0,0 +1,8 @@
using System;
namespace ClassLibrary1
{
public class Class1
{
}
}

7
ClassLibrary1/ClassLibrary1.csproj

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

49
ConsoleApp1.sln

@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30709.132
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleCore", "ConsoleCore\ConsoleCore.csproj", "{8C59285B-1979-428B-9059-33D4C10C9B4B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{4B47A70E-5841-4EC4-982C-7CF5FBE49B83}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{FBC81116-8AE7-445B-9574-FE9B993BF8D6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLib000", "ClassLib000\ClassLib000.csproj", "{8A0E8502-24A4-400A-9B7C-30AA3D3BA829}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp2", "ConsoleApp2\ConsoleApp2.csproj", "{8F11153A-4877-4966-9203-43A378792E4F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8C59285B-1979-428B-9059-33D4C10C9B4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C59285B-1979-428B-9059-33D4C10C9B4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C59285B-1979-428B-9059-33D4C10C9B4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C59285B-1979-428B-9059-33D4C10C9B4B}.Release|Any CPU.Build.0 = Release|Any CPU
{4B47A70E-5841-4EC4-982C-7CF5FBE49B83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B47A70E-5841-4EC4-982C-7CF5FBE49B83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B47A70E-5841-4EC4-982C-7CF5FBE49B83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B47A70E-5841-4EC4-982C-7CF5FBE49B83}.Release|Any CPU.Build.0 = Release|Any CPU
{FBC81116-8AE7-445B-9574-FE9B993BF8D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBC81116-8AE7-445B-9574-FE9B993BF8D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBC81116-8AE7-445B-9574-FE9B993BF8D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBC81116-8AE7-445B-9574-FE9B993BF8D6}.Release|Any CPU.Build.0 = Release|Any CPU
{8A0E8502-24A4-400A-9B7C-30AA3D3BA829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A0E8502-24A4-400A-9B7C-30AA3D3BA829}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A0E8502-24A4-400A-9B7C-30AA3D3BA829}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A0E8502-24A4-400A-9B7C-30AA3D3BA829}.Release|Any CPU.Build.0 = Release|Any CPU
{8F11153A-4877-4966-9203-43A378792E4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F11153A-4877-4966-9203-43A378792E4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F11153A-4877-4966-9203-43A378792E4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F11153A-4877-4966-9203-43A378792E4F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3A21F5E6-FCEE-4E22-9F88-64EC05F0AF30}
EndGlobalSection
EndGlobal

20
ConsoleApp1/ConsoleApp1.csproj

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\Build</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Build</OutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ClassLib000\ClassLib000.csproj" />
</ItemGroup>
</Project>

12
ConsoleApp1/Program.cs

@ -0,0 +1,12 @@
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

6
ConsoleApp2/App.config

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

59
ConsoleApp2/ConsoleApp2.csproj

@ -0,0 +1,59 @@
<?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>{8F11153A-4877-4966-9203-43A378792E4F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp2</RootNamespace>
<AssemblyName>ConsoleApp2</AssemblyName>
<TargetFrameworkVersion>v4.7.2</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>
<ItemGroup>
<ProjectReference Include="..\ClassLib000\ClassLib000.csproj">
<Project>{8a0e8502-24a4-400a-9b7c-30aa3d3ba829}</Project>
<Name>ClassLib000</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

132
ConsoleApp2/Program.cs

@ -0,0 +1,132 @@
using c1 = ClassLib000.TestModel.Car;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
int Count = 24;
DayOfWeek dow = DateTime.Now.DayOfWeek;
int tt = 1;
string s = String.Empty;
if (dow == DayOfWeek.Saturday || dow == DayOfWeek.Sunday)
{
s = "weekend";
}
else
{
s = "weekday";
}
Console.WriteLine(
(dow == DayOfWeek.Saturday || dow == DayOfWeek.Sunday)
? "weekend"
: (dow == DayOfWeek.Friday
? "almost weekend"
: "weekday")
);
/*
if (dow == DayOfWeek.Saturday || dow == DayOfWeek.Sunday)
{
return;
}
if (dow == DayOfWeek.Saturday | dow == DayOfWeek.Sunday)
{
return;
}
if (dow == DayOfWeek.Saturday && dow == DayOfWeek.Sunday)
{
return;
}
if (dow == DayOfWeek.Saturday & dow == DayOfWeek.Sunday)
{
return;
}
*/
switch (dow)
{
case DayOfWeek.Sunday:
{
int ttt = 1;
Console.WriteLine("Sunday");
break;
}
case DayOfWeek.Saturday:
{
tt = 1;
Console.WriteLine("Saturday");
break;
}
case DayOfWeek.Monday:
Console.WriteLine("Monday");
break;
case DayOfWeek.Tuesday:
case DayOfWeek.Wednesday:
case DayOfWeek.Thursday:
case DayOfWeek.Friday:
Console.WriteLine("Something another");
break;
default:
Console.WriteLine("Another");
break;
}
ClassLib000.TestModel.Car ourCar = new ClassLib000.TestModel.Car();
int ii = 1;
string sString = "🎁🎁";
byte[] bt = new byte[ii];
for (System.Int32 ii = 0; ii < Count; ii++)
{
ourCar.PassYear();
if (ii > 100)
{
break;
}
Console.WriteLine($"{ourCar.AgeYears}!");
}
bool bBreak = false;
for (int xx = 0; xx < 100; xx++)
{
if (xx > 10)
{
// continue;
}
else
{
if (bBreak)
{
//
}
else
{
for (int yy = 0; yy < 100; yy++)
{
if (!bBreak)
{
if (yy > 10)
{
bBreak = true;
}
else
{
Console.WriteLine($"{xx};{yy}");
}
}
}
}
}
}
}
}
}

36
ConsoleApp2/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("ConsoleApp2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApp2")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[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("8f11153a-4877-4966-9203-43a378792e4f")]
// 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")]

47
ConsoleCore/ChessConsoler.cs

@ -0,0 +1,47 @@
using ClassLib000.Chess;
using System;
namespace ConsoleCore
{
class ChessConsoler
{
public static void ChessRedrawBrokenFigures(ChessGame game)
{
Figure[] arWhite = game.WhitePlayer.GetBrokenFigures();
Figure[] arBlack = game.BlackPlayer.GetBrokenFigures();
//
}
public static void ChessRedrawBoard(ChessGame game)
{
Console.Clear();
ChessDrawBoard();
ChessDrawFigures(game.BlackPlayer, ConsoleColor.Green);
ChessDrawFigures(game.WhitePlayer, ConsoleColor.Blue);
}
private static void ChessDrawFigures(Player player, ConsoleColor color)
{
ChessDrawSingleFigure(player.Пешка1, color);
ChessDrawSingleFigure(player.Пешка2, color);
ChessDrawSingleFigure(player.Пешка3, color);
ChessDrawSingleFigure(player.Пешка4, color);
// ..
}
private static void ChessDrawSingleFigure(Figure fig, ConsoleColor color)
{
int x = fig.X;
int y = fig.Y;
EColor figureColor = fig.Color;
EFigureType ft = fig.Type;
// TODO: .. Console.SetCursorPosition(posx, posy);
}
private static void ChessDrawBoard()
{
// throw new NotImplementedException();
}
}
}

20
ConsoleCore/ConsoleCore.csproj

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\ClassLib000\ClassLib000.csproj" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\Build</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Build</OutputPath>
</PropertyGroup>
</Project>

117
ConsoleCore/Program.cs

@ -0,0 +1,117 @@
using System;
using ClassLib000.Chess;
using ClassLib000.TestModel;
namespace ConsoleCore
{
class Program
{
static void Main(string[] args)
{
// -=-=-=-=
// L2Demo();
// -=-=-=-= Chess game
//ChessGame game = new ChessGame();
//game.Init();
//ChessConsoler.ChessRedrawBoard(game);
//ChessConsoler.ChessRedrawBrokenFigures(game);
}
/*
private static void L2Demo()
{
Console.WriteLine(String.Compare("папа", "мама"));
string s = String.Empty;
int Count = 24;
new Car();
Car ourCar = new Car();
for (int ii = 0; ii < Count; ii++)
{
if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday)
{
if (ii > 5) continue;
if (ii > 5)
{
// ..
}
else
{
ourCar.PassYear();
Console.WriteLine($"🔑{ourCar.AgeYears}!");
}
}
}
bool bBreak = false;
for (int ii = 0; ii < Count; ii++)
{
if (!bBreak)
{
if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday)
{
if (ii > 5)
{
bBreak = true;
//break;
}
}
ourCar.PassYear();
Console.WriteLine($"{ourCar.AgeYears}!");
}
}
DayOfWeek dow = DateTime.Now.DayOfWeek;
Console.WriteLine(
"The day is week" +
(dow == DayOfWeek.Saturday || dow == DayOfWeek.Sunday
? "end"
: "day"));
//if (dow == DayOfWeek.Saturday || dow == DayOfWeek.Sunday)
//{
// //
//}
//if (dow == DayOfWeek.Saturday | dow == DayOfWeek.Sunday)
//{
// //
//}
//if (dow == DayOfWeek.Saturday && dow == DayOfWeek.Sunday)
//{
// //
//}
//if (dow == DayOfWeek.Saturday & dow == DayOfWeek.Sunday)
//{
// //
//}
switch (dow)
{
case DayOfWeek.Monday:
{
Console.WriteLine("Monday");
break;
}
case DayOfWeek.Sunday:
{
break;
}
case DayOfWeek.Tuesday:
case DayOfWeek.Wednesday:
case DayOfWeek.Thursday:
case DayOfWeek.Friday:
case DayOfWeek.Saturday:
break;
default:
break;
}
} */
}
}
Loading…
Cancel
Save