Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
Total
관리 메뉴

행복한 개구리

C# 0309 하템 스톰사용 본문

C#/수업내용

C# 0309 하템 스톰사용

HappyFrog 2021. 3. 9. 18:17
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework000
{
    class Program
    {



        static void Main(string[] args)
        {
            string unitName = "하이템플러";
            string skillName = "사이오닉 스톰";
            int energy = 10;
            int maxEnergy = 55;
            int skillCost = 40;


            Console.WriteLine("{0}이 생성되었습니다.", unitName);
            Console.WriteLine("에너지 {0}/{1}", energy, maxEnergy);
            Console.WriteLine("{0} {1} 정보", unitName, skillName);
            Console.WriteLine("필요 에너지 : {0}", skillCost);
            Console.WriteLine("{0}가 {1}을 시도합니다.", unitName, skillName);
            if (energy < 40)
            {
                Console.WriteLine("에너지가 부족합니다.");
            }


            for(int i = 0; i<100; i++)
            {
                energy += 1;
                Console.WriteLine("에너지가 충전되었습니다. {0}/{1}", energy, maxEnergy);
                
                if (energy <= 10)
                {
                    continue;
                }
                
                else if (energy > 49)
                {
                    break;                    
                }
                

            }
            Console.WriteLine("{0}가 {1}을 시도합니다.", unitName, skillName);
            Console.WriteLine("{0}가 {1}을 시전했습니다.", unitName, skillName);

            energy -= skillCost;
            Console.WriteLine("{0}/{1}", energy, maxEnergy);



            //템플러가 생성되었습니다.
            //에너지 10/55

            //템플러 사이오닉스톰 정보
            //필요 에너지 : 40

            //템플러가 사이오닉 스톰을 시도합니다.
            //에너지가 부족합니다.

            //에너지가 충전되었습니다. (11/55)
            //....
            //에너지가 충전되었습니다. (50/55)

            //템플러가 지짐이를 시도합니다.
            //템플러가 지졌습니다.
            //에너지 (10/55)
        }


    }
}

'C# > 수업내용' 카테고리의 다른 글

C# 21.03.11.수업내용  (0) 2021.03.11
C# 21.03.10.수업내용  (0) 2021.03.10
C# 0309 디팟짓기  (0) 2021.03.09
C# 0309 마린vs저글링  (0) 2021.03.09
C# 0309 커멘드센터 SCV  (0) 2021.03.09