コード例 #1
0
        static void Main(string[] args)
        {
            PrimaryPlayer player = PrimaryPlayer.Instance;

            Console.WriteLine($"{player.Name} - lvl {player.Level}");
            Console.ReadKey();
        }
コード例 #2
0
        public Gameboard()
        {
            _player        = PrimaryPlayer.Instance;
            _player.Weapon = new Sword(12, 8);
            Console.WriteLine($"Name: {_player.Name}, Level: {_player.Level}");

            PlayArea(1);
        }
 static PrimaryPlayer()
 {
     _instance = new PrimaryPlayer()
     {
         Name = "Raptor",
         Level = 1
     };
 }
コード例 #4
0
 static PrimaryPlayer()
 {
     _instance = new PrimaryPlayer
     {
         Name   = "Player-001",
         Level  = 1,
         Armor  = 25,
         Health = 100,
     };
 }
 static PrimaryPlayer()
 {
     _instance = new PrimaryPlayer()
     {
         Name   = "Raptor",
         Level  = 1,
         Armor  = 25,
         Health = 100
     };
 }
コード例 #6
0
 static PrimaryPlayer()
 {
     Console.Write("Your name: ");
     Instance = new PrimaryPlayer()
     {
         Name   = Console.ReadLine(),
         Level  = 1,
         Health = 100,
         Armor  = 25,
     };
 }
コード例 #7
0
        static void Main(string[] args)
        {
            // The code provided will print ‘Hello World’ to the console.
            // Press Ctrl+F5 (or go to Debug > Start Without Debugging) to run your app.
            PrimaryPlayer player  = PrimaryPlayer.Instance;
            PrimaryPlayer player2 = PrimaryPlayer.Instance2;

            Console.WriteLine($"{player.Name} -lvl {player.Level}");
            Console.WriteLine($"{player2.Name} -lv2 {player2.Level}");
            Console.ReadKey();

            // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app!
        }
コード例 #8
0
        static PrimaryPlayer()
        {
            _instance = new PrimaryPlayer()
            {
                Name  = "Raptor",
                Level = 1
            };

            _instance2 = new PrimaryPlayer()
            {
                Name  = "rutha",
                Level = 2
            };
        }
コード例 #9
0
        public async Task Play(PrimaryPlayer player, int areaLevel)
        {
            _player    = player;
            _areaLevel = areaLevel;
            ConfigurePlayerWeapon();
            await AddPlayerCards();

            LoadZombies(areaLevel);
            LoadWerewolves(areaLevel);
            LoadGiants(areaLevel);
            // Begin Playing Logic
            this.StartTurns();
            // if (areaLevel == 1) this.PlayFirstLevel();
        }
コード例 #10
0
 public void Defend(PrimaryPlayer player)
 {
     Console.WriteLine($"Zombie tries to defend from {player.Name}");
     Health += 3;
 }
コード例 #11
0
 public void Defend(PrimaryPlayer player)
 {
     Console.WriteLine($"Werewolf is defending from {player.Name}");
     Health += 7;
 }
コード例 #12
0
 public Gameboard()
 {
     _player        = PrimaryPlayer.Instance;
     _player.Weapon = new Sword(12, 8);
 }
コード例 #13
0
 public void Attack(PrimaryPlayer player)
 {
     Console.WriteLine($"Zombie attacks {player.Name}");
     player.Health -= 5;
 }
コード例 #14
0
 public void Attack(PrimaryPlayer player)
 {
     Console.WriteLine($"Giant is attacking {player.Name}");
     player.Health -= 10;
 }
コード例 #15
0
 public GameBoard()
 {
     _player          = PrimaryPlayer.Instance;
     _gameBoardFacade = new GameBoardFacade();
 }
コード例 #16
0
 public void Defend(PrimaryPlayer player)
 {
     Console.WriteLine($"Giant is defending from {player.Name}");
     Health += 5;
 }
コード例 #17
0
 public void Attack(PrimaryPlayer player)
 {
     Console.WriteLine($"Werewolf is attacking {player.Name}");
     player.Health -= 3;
 }
 public Gameboard()
 {
     _player = PrimaryPlayer.Instance;
 }