Skip to content

Instantly share code, notes, and snippets.

@Hellhackee
Hellhackee / gist:091b090fec2a0d84ce26a4c0ce65bce1
Created December 15, 2020 21:57
CS Light Lesson 39 (criminal)
class Program
{
static void Main(string[] args)
{
Criminal criminal1 = new Criminal("Дамский угодник", false, 185, 102, "англичанин");
Criminal criminal2 = new Criminal("Карманник", false, 160, 55, "русский");
Criminal criminal3 = new Criminal("Форточник", true, 173, 80, "англичанин");
Criminal criminal4 = new Criminal("Серийный убийца", false, 185, 102, "англичанин");
List<Criminal> criminals = new List<Criminal>() { criminal1, criminal2 , criminal3, criminal4 };
@Hellhackee
Hellhackee / gist:14e4973e78c37c0fbb895f1847c8397f
Last active December 15, 2020 20:41
CS Light Lesson 38 (autoservice)
class Program
{
static void Main(string[] args)
{
bool isOpen = true;
int input;
int inputIndex;
AutoService autoService = new AutoService();
@Hellhackee
Hellhackee / gist:ee5e69ac7e218a2f423886fcd10da1c2
Last active December 14, 2020 21:28
CS Light Lesson 36 (aquarium)
class Program
{
static void Main(string[] args)
{
bool isOpen = true;
string input;
int inputFishIndex;
Aquarium aquarium = new Aquarium();
@Hellhackee
Hellhackee / gist:d8c376db48f05b19daef1181322c2537
Last active December 14, 2020 21:07
CS Light Lesson 35 (war)
class Program
{
static void Main(string[] args)
{
bool isFightEnded = false;
bool isFirstCountyLost = false;
bool isSecondCountyLost = false;
Country country1 = new Country("Пакистан");
Country country2 = new Country("Ватикан");
@Hellhackee
Hellhackee / gist:05a28acefee888654f692e2eb4e02408
Last active December 13, 2020 19:02
CS Light Lesson 37 (zoo)
public enum Gender
{
man, woman
}
class Program
{
static private Random _random = new Random();
static void Main(string[] args)
@Hellhackee
Hellhackee / gist:50cea3f5ed30c706abc5e2b095550863
Last active December 10, 2020 19:36
CS Light Lesson 34 (shop)
class Program
{
private static Random _random = new Random();
static void Main(string[] args)
{
int shoppersCount = 5;
int shopperIndex = 1;
Queue<Shopper> shoppers = new Queue<Shopper>();
@Hellhackee
Hellhackee / gist:8d54ae8391fc811d8c64eb115690680d
Last active December 9, 2020 21:52
CS Light Lesson 33 (warriors fight)
class Program
{
static void Main(string[] args)
{
Warlock warlock = new Warlock(200, 50, 20, 5, "Колдун");
Swordman swordman = new Swordman(200, 15, 40, 15, "Воин");
Archer archer = new Archer(200, 35, 35, 10, "Лучник");
Priest priest = new Priest(250, 50, 25, 10, "Священник");
Tank tank = new Tank(300, 0, 30, 20, "Танк");
@Hellhackee
Hellhackee / gist:ded52f30fafdbc67a08e734c19b72da0
Last active December 7, 2020 18:23
CS Light Lesson 32 (train)
class Program
{
static void Main(string[] args)
{
Random random = new Random();
int countTickets = 0;
string pointA = "";
string pointB = "";
string inputComand;
bool isOpen = true;
@Hellhackee
Hellhackee / gist:5cbf28ef43d9b2bbb6b92312420db27e
Last active December 6, 2020 20:41
CS Light Lesson 31.1 (shop)
class Program
{
static void Main(string[] args)
{
string commandCode;
bool isOpen = true;
Player player = new Player(250);
Trader trader = new Trader(new List<Item>
@Hellhackee
Hellhackee / gist:b0d4293fc5533ab5264d453ab24a83bf
Last active December 2, 2020 21:35
CS Light Lesson 22.1 (move map)
static void Main(string[] args)
{
bool isFinish = false;
int valueChangeX;
int valueChangeY;
int userX = 4;
int userY = 4;
char[,] map =
{
{'#','#','#','#','#','#','#','#','#','#','#','#','#'},