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.Data; | |
using System.Reflection; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class Programm | |
{ | |
public static void Main() | |
{ | |
BallotView ballotView = new BallotView(new PresenterFactory()); |
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 IMJunior | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Dictionary<string, IPaymentSystemFactory>paymentFactories = new Dictionary<string, IPaymentSystemFactory>() | |
{ | |
{"1", new QiwiFactory()}, | |
{"2", new WebMoneyFactory()}, |
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 void Shoot(Player player) { } | |
public string FindBy(int index) { } |
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 void Enable() | |
{ | |
_effects.StartEnableAnimation(); | |
} | |
public void Disable() | |
{ | |
_pool.Free(this); | |
} |
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 Mover _mover; | |
private readonly Weapon _weapon; | |
public Player(Mover mover, Weapon weapon) | |
{ | |
if (mover == null || weapon == null) | |
throw new ArgumentNullException(); | |
} |
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 static void SpawnObject() | |
{ | |
//spawn logic | |
} | |
public static void RandomizeChance() | |
{ | |
_chance = Random.Range(0, 100); | |
} |
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
class Player { } | |
class Weapon { } | |
class Follower { } | |
class UnitReceiver | |
{ | |
public IReadOnlyCollection<Unit> Units { get; private set; } | |
} |
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 Weapon | |
{ | |
public void Shoot() { } | |
} |
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 int _armySize = 10; | |
private int _coinsAmount = 10; | |
private string _firstName = "Vladislav"; |
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 Weapon | |
{ | |
private int _bullets; | |
public bool CanShoot => _bullets > 0; | |
public void Shoot() | |
{ | |
if (CanShoot == false) | |
throw new InvalidOperationException(nameof(CanShoot)); |
NewerOlder