This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Player | |
{ | |
private readonly string _name; | |
private readonly int _age; | |
private readonly Mover _mover; | |
private readonly Attacker _attacker; | |
public Player(string name, int age, Mover mover, Attacker attacker) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private const int MinChance = 0; | |
private const int MaxChance = 100; | |
public static void SpawnObject() | |
{ | |
//Создание объекта на карте | |
} | |
public static void GenerateChance() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
using System.Text; | |
namespace Encapsulation | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Order order = new(50, 12000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Encapsulation | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Pathfinder fileWritter = new(new FileLogger()); | |
Pathfinder consoleWritter = new(new ConsoleLogger()); | |
Pathfinder fridayFileWritter = new(new FridayLogger(new FileLogger())); | |
Pathfinder fridayConsoleWritter = new(new FridayLogger(new ConsoleLogger())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Encapsulation | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Good iPhone12 = new("IPhone 12"); | |
Good iPhone11 = new("IPhone 11"); | |
Warehouse warehouse = new(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Encapsulation | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int weaponDamage = 5; | |
int weaponBulletsCount = 30; | |
int bulletsCountForFire = 1; | |
int playerHealth = 100; |