반응형
SMALL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace diablo_game_item
{
class Program
{
static void Main(string[] args)
{
string ShoulderName = "Razeth's Volition";
string ShoulderLevel = "Legendary Shoulders";
int minShoulderArmor = 58;
int maxShoulderArmor = 68;
string category = "Armor";
string mainFunction = "Primary";
float minMainfunction = 5.0f;
float maxMainfunction = 8.0f;
string secondFunction = "Secondary";
int minsecondFunction = 35;
int maxsecondFunction = 50;
int choicesecondFunction = 3;
int minchoicesecondFunction = 416;
int maxchoicesecondFunction = 500;
int fourthsecondFunction = 4;
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.Write(ShoulderName);
Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine(String.Format("{0,50}","19"));
Console.ResetColor();
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine(ShoulderLevel);
Console.ResetColor();
Console.WriteLine("{0} - {1}", minShoulderArmor, maxShoulderArmor);
Console.WriteLine(category);
Console.WriteLine(mainFunction);
Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.WriteLine("*Critical Hit Chance Increased by[{0:0.0} - {1:0.0}] %", minMainfunction, maxMainfunction);
Console.ResetColor();
Console.WriteLine(secondFunction);
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine(
"Skeletal Mage gains the effect of the Gift of Death and Singularity runes. You gain 39% damage reduction if your Essence is not full. (Necromancer Only) [{0} - {1}]%", minsecondFunction, maxsecondFunction
);
Console.ResetColor();
Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.WriteLine("*One of {0} Magic Properties (varies)", choicesecondFunction);
Console.WriteLine("\t*+[{0}- {1}] Dexterity", minchoicesecondFunction, maxchoicesecondFunction);
Console.WriteLine("\t*+[{0}- {1}] Intelligence", minchoicesecondFunction, maxchoicesecondFunction);
Console.WriteLine("\t*+[{0}- {1}] Strength", minchoicesecondFunction, maxchoicesecondFunction);
Console.WriteLine("*+{0} Random Magic Properties", fourthsecondFunction);
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine("Account Bound");
Console.ResetColor();
}
}
}
결과물
* 다 만들고 나니 모든 라인별로 컬러를 리셋해줄 필요가 없다는 걸 깨닳았다... (원래 콘솔창 글자 색상인 흰색으로 만드려는게 아니라면 굳이 리셋 안해도 됨)
*부분 별로 컬러를 지정해주는 편리한 방법을 찾아봐야겠다 (지금도 할수는 있지만 비효율 적인듯)
반응형
LIST
'C# > 수업 과제' 카테고리의 다른 글
C# 2023.1.1 아이템 기능 상세 출력 과제 (사이퍼즈 1) (0) | 2023.01.01 |
---|---|
2022.11.1 C# 수업과제 (디아블로 아이템 5) (0) | 2023.01.01 |
2022.11.1 C# 수업과제 (디아블로 아이템 4) (0) | 2023.01.01 |
2022.1.1 C# 수업과제 (디아블로 아이템 3) (1) | 2023.01.01 |
2022.12.30 C# 수업과제 (디아블로 아이템 1) (2) | 2022.12.30 |