c\#작 성 된 간단 한 비행 바둑 게임
구현 코드
using System;
namespace
{
class Program
{
///1、
///2、
/// ,
///3、
///4、
// ,
public static int[] Maps = new int[100];
// A B
public static int[] PlayerPos = new int[2];
//
public static string[] PlayerName = new string[2];
public static bool[] Flag = new bool[2];
static void Main(string[] args)
{
TitleName();
#region
Console.WriteLine(" A ");
PlayerName[0] = Console.ReadLine();
while (PlayerName[0] == "")
{
Console.WriteLine(" A , ");
PlayerName[0] = Console.ReadLine();
}
Console.WriteLine(" B ");
PlayerName[1] = Console.ReadLine();
while (PlayerName[1] == "" || PlayerName[1] == PlayerName[0])
{
if (PlayerName[1] == "")
{
Console.WriteLine(" B , ");
PlayerName[1] = Console.ReadLine();
}
else
{
Console.WriteLine(" B A , ");
PlayerName[1] = Console.ReadLine();
}
}
#endregion
//
Console.Clear();//
TitleName();
Console.WriteLine("{0} A
{1} B ", PlayerName[0], PlayerName[1]);
//
InitailMap();
DrawMap();
// A B ,
while (PlayerPos[0] < 99 && PlayerPos[1] < 99)
{
if (Flag[0] == false)
{
PlayGame(0);
}
else
{
Flag[0] = false;
}
if(PlayerPos [0]>=99)
{
Console.WriteLine(" {0} ", PlayerName[0]);
break;
}
if (Flag[1]==false)
{
PlayGame(1);
}
else
{
Flag[1] = false;
}
if(PlayerPos[1] >= 99)
{
Console.WriteLine(" {0} ", PlayerName[1]);
break;
}
}//while
Console.ReadKey();
}
/// <summary>
///
/// </summary>
public static void TitleName()
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("******************");
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine("******************");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("******************");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("**** ****");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("******************");
Console.ForegroundColor = ConsoleColor.Gray;
Console.WriteLine("******************");
Console.ForegroundColor = ConsoleColor.DarkMagenta;
Console.WriteLine("******************");
}
/// <summary>
/// ,
/// </summary>
public static void InitailMap()
{
int[] luckyturn = { 6, 23, 38, 45, 78, 90 };//
for (int i = 0; i < luckyturn.Length; i++)
{
Maps[luckyturn[i]] = 1;
}
int[] landline = { 5, 22, 31, 44, 75, 87, 92 };//
for (int i = 0; i < landline.Length; i++)
{
Maps[landline[i]] = 2;
}
int[] pause = { 7, 15, 25, 46, 56, 84 };//
for (int i = 0; i < pause.Length; i++)
{
Maps[pause[i]] = 3;
}
int[] timeTunnel = { 9, 18, 29, 37, 42, 63, 72, 88, 96 };//
for (int i = 0; i < timeTunnel.Length; i++)
{
Maps[timeTunnel[i]] = 4;
}
}
/// <summary>
///
/// </summary>
public static void DrawMap()
{
Console.WriteLine(" : :▲ :☆ :○ :¥");
#region
//
for (int i = 0; i < 30; i++)
{
Console.Write(DrawStringMap(i));//
}//for
#endregion
//
Console.WriteLine();
#region
//
for (int i = 30; i < 35; i++)
{
for (int j = 0; j <= 28; j++)
{
Console.Write(" ");//
}
Console.Write(DrawStringMap(i));//
Console.WriteLine();
}
#endregion
#region
for (int i = 64; i >= 35; i--)
{
Console.Write(DrawStringMap(i));
}
#endregion
//
Console.WriteLine();
#region
for (int i = 65; i <= 69; i++)
{
Console.WriteLine(DrawStringMap(i));
}
#endregion
#region
for (int i = 70; i <= 99; i++)
{
Console.Write(DrawStringMap(i));
}
#endregion
//
Console.WriteLine();
}
#region
/// <summary>
///
/// </summary>
/// <param name="i"> </param>
/// <returns></returns>
public static string DrawStringMap(int i)
{
//
string str = "";
if (PlayerPos[0] == PlayerPos[1] && PlayerPos[0] == i)
{
str = "<>";
}
else if (PlayerPos[0] == i)
{
str = "A";
}
else if (PlayerPos[1] == i)
{
str = "B";
}
else
{
switch (Maps[i])
{
case 0:
Console.ForegroundColor = ConsoleColor.Red;
str = "□";
break;
case 1:
Console.ForegroundColor = ConsoleColor.Green;
str = "▲";
break;
case 2:
Console.ForegroundColor = ConsoleColor.Gray;
str = "☆";
break;
case 3:
Console.ForegroundColor = ConsoleColor.Yellow;
str = "○";
break;
case 4:
Console.ForegroundColor = ConsoleColor.Blue;
str = "¥";
break;
}//switch
}//if
return str;
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="playerNumber"> </param>
public static void PlayGame(int playerNumber)
{
Random r = new Random();//
int rNumber = r.Next(1, 7);// 1-7
Console.WriteLine("{0} ", PlayerName[playerNumber]);
Console.ReadKey(true);
Console.WriteLine("{0} {1}", PlayerName[playerNumber], rNumber);// 1-7
PlayerPos[playerNumber] += rNumber;//
ChangePos();// , 0-99
Console.ReadKey(true);
if (PlayerPos[playerNumber] == PlayerPos[1 - playerNumber])
{
Console.WriteLine(" {0} {1}, {2} 6 ", PlayerName[playerNumber], PlayerName[1 - playerNumber], PlayerName[1 - playerNumber]);
PlayerPos[1 - playerNumber] -= 6;
ChangePos();
Console.ReadKey(true);
}
else
{
switch (Maps[PlayerPos[playerNumber]])
{
case 0:
Console.WriteLine(" {0} , ", PlayerName[playerNumber]);
Console.ReadKey(true);
break;
case 1:
Console.WriteLine(" {0} , 1-- ,2-- ", PlayerName[playerNumber]);
Console.ReadKey(true);
string input = Console.ReadLine();
while (true)
{
if (input == "1")
{
Console.WriteLine(" {0} {1} ", PlayerName[playerNumber], PlayerName[1 - playerNumber]);
Console.ReadKey(true);
int temp = PlayerPos[playerNumber];
PlayerPos[playerNumber] = PlayerPos[1 - playerNumber];
PlayerPos[1 - playerNumber] = temp;
ChangePos();
Console.WriteLine(" , ");
Console.ReadKey(true);
break;
}
else if (input == "2")
{
Console.WriteLine(" {0} {1}, {2} 6 ", PlayerName[playerNumber], PlayerName[1 - playerNumber], PlayerName[1 - playerNumber]);
Console.ReadKey(true);
PlayerPos[1 - playerNumber] -= 6;
ChangePos();
Console.WriteLine(" {0} 6 , ", PlayerName[1 - playerNumber]);
Console.ReadKey(true);
break;
}
else
{
Console.WriteLine(" , !");
input=Console.ReadLine();
Console.ReadKey(true);
}
}
break;
case 2:
Console.WriteLine(" {0} , 6 ", PlayerName[playerNumber]);
Console.ReadKey(true);
PlayerPos[playerNumber] -= 6;
ChangePos();
Console.ReadKey(true);
break;
case 3:
Console.WriteLine(" {0} , ", PlayerName[playerNumber]);
Flag[playerNumber] = true;
Console.ReadKey(true);
break;
case 4:
Console.WriteLine(" {0} , 10 ", PlayerName[playerNumber]);
Console.ReadKey(true);
PlayerPos[playerNumber] += 10;
ChangePos();
Console.ReadKey(true);
break;
}//switch
}//else
ChangePos();//perfect
Console.Clear();
DrawMap();
}
/// <summary>
/// , 0-99
/// </summary>
public static void ChangePos()
{
if (PlayerPos[0] < 0)
{
PlayerPos[0] = 0;
}
if (PlayerPos[0] >= 99)
{
PlayerPos[0] = 99;
}
if (PlayerPos[1] < 0)
{
PlayerPos[1] = 0;
}
if (PlayerPos[1] >= 99)
{
PlayerPos[1] = 99;
}
}
}
}
winform 기반 그래 픽 인터페이스 프로그램효과.
코드
using System;
using System.Drawing;
using System.Windows.Forms;
namespace
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//
int[] mapList = new int[390];
//
PictureBox[] mappic = new PictureBox[390];
//
int[] road = new int[100];
//
Panel map = new Panel();
int size = 30;
//
PictureBox dice = new PictureBox();
//
Panel plan1 = new Panel();
//
Panel plan2 = new Panel();
private void Form1_Load(object sender, EventArgs e)
{
this.Size = new Size(1200, 600);
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.Location = new Point(250, 100);
this.BackColor = Color.Wheat;
map.Size = new Size(30*size, 13*size);
map.BorderStyle = BorderStyle.FixedSingle;
map.Location = new Point(40,160);
this.Controls.Add(map);
//
Init();
plan1.Size = new Size(100, 100);
plan1.Location = new Point(map.Left, map.Top - 120);
plan1.BackgroundImage = Image.FromFile("../../img/circle.png");
plan1.BackgroundImageLayout = ImageLayout.Stretch;
this.Controls.Add(plan1);
plan2.Size = new Size(100, 100);
plan2.Location = new Point(map.Left+120 ,map.Top - 120);
plan2.BackgroundImage = Image.FromFile("../../img/circle.png");
plan2.BackgroundImageLayout = ImageLayout.Stretch;
this.Controls.Add(plan2);
PictureBox redPlayer = new PictureBox();
redPlayer.Size = new Size(80, 80);
redPlayer.Image = Image.FromFile("../../img/red.png");
redPlayer.Location = new Point(10, 10);
redPlayer.SizeMode = PictureBoxSizeMode.StretchImage;
plan1.Controls.Add(redPlayer);
PictureBox greenPlayer = new PictureBox();
greenPlayer.Size = new Size(80, 80);
greenPlayer.Image = Image.FromFile("../../img/green.png");
greenPlayer.Location = new Point(10, 10);
greenPlayer.SizeMode = PictureBoxSizeMode.StretchImage;
plan2.Controls.Add(greenPlayer);
//
tall.Size = new Size(200, 500);
tall.Location = new Point(map.Right + 20, 50);
tall.ReadOnly = true;
this.Controls.Add(tall);
// :
name.Size = new Size(100, 30);
name.Location = new Point(45,10);
this.Controls.Add(name);
// :
names.Size = new Size(100, 30);
names.Location = new Point(160,10 );
this.Controls.Add(names);
btn.Location = new Point(300,10);
btn.Text = " ";
btn.Size = new Size(100, 30);
btn.BackColor = Color.Pink;
btn.Click += Btn_Click;
this.Controls.Add(btn);
//
dice.Size = new Size(80, 80);
dice.Image = Image.FromFile("../../img/roll.png");
dice.Location = new Point(map.Right-160,map.Top-120);
dice.SizeMode = PictureBoxSizeMode.StretchImage;
this.Controls.Add(dice);
dice.MouseClick += Dice_MouseClick;
}
private void Btn_Click(object sender, EventArgs e)
{
//
Tall(string.Format(" ,{0} , ",name.Text));
playName[0] = name.Text;
playName[1] = names.Text;
tall.Focus();
}
TextBox name = new TextBox();
TextBox names = new TextBox();
Button btn = new Button();
//
RichTextBox tall = new RichTextBox();
//
Random r = new Random();
// 0 1
bool[] playStart = new bool[2] { true, false };
//
int[] playPosition = new int[2] { -1, -1 };
int[] playStand = new int[2] { -1, -1 };
//
int[] shaizi = new int[2];
string[] playName = new string[2];
//
int[] num = new int[2] ;
//1.
private void Dice_MouseClick(object sender, MouseEventArgs e)
{
PlayDice();
PlayGame();
}
private void PlayDice()
{
// true false
if (playStart[0])
{
shaizi[0] = r.Next(1,7);
Tall(String.Format("{1} {0} ", shaizi[0],playName[0]));
playStart[0] = !playStart[0];
}
else
{
playStart[0] = !playStart[0];
}
// false true .
if (playStart[1])
{
shaizi[1] = r.Next(1, 7);
Tall(String.Format("{1} {0} ", shaizi[1],playName[1]));
playStart[1] = !playStart[1];
}
else
{
playStart[1] = !playStart[1];
}
}
//
private void OutDoor()
{
// true false 0
if (playStart[0]&&!playStart[1]&&(shaizi[0]!=0||shaizi[1]!=0))
{
if (shaizi[0] == shaizi[1])
{
Tall(" , ");
}
else
{
//
st = false;
if (shaizi[0] > shaizi[1])
{
Tall(String.Format("{0} , ,{0} ",name.Text));
playStart[0] = true;
playStart[1] = false;
}
if (shaizi[0] < shaizi[1])
{
Tall(String.Format("{0} , ,{0} ", names.Text));
playStart[0] = false;
playStart[1] = true;
}
}
}
}
bool st = true;
//
private void PlayGame()
{
//
if (st == true)
{
OutDoor();
// false
if (!playStart[0]&&playStart[1])
{
Tall(string.Format(" {0} ",names.Text));
}// true
else if(playStart[0]&&!playStart[1])
{
Tall(string.Format(" {0} !",name.Text));
}
}
else
{
if (playStart[0] && !playStart[1])// , true
{
PlayReturn(1);
}//
else if (!playStart[0] && playStart[1])
{
PlayReturn(0);
}
}
}
/// <summary>
///
/// </summary>
/// index0 1
bool[] re = new bool[2] { false, false };
private void PlayReturn(int index)
{
//
if (playPosition[index] == -1)
{
switch (shaizi[index])
{
case 2:
case 4:
Tall(String.Format("{0} ", playName[index]));
playPosition[index] = 0;
playStand[index] = 0;
//
if (playPosition[1] == playPosition[0])
{
mappic[road[playPosition[index]]].Image = imageList1.Images[2];
}
else
{
mappic[road[playPosition[index]]].Image = imageList1.Images[index];
}
break;
case 6:
playStart[index] = true;
playStart[1 - index] = false;
Tall(String.Format("{0} ", playName[index]));
playPosition[index] = 0;
playStand[index] = 0;
if (playPosition[1] == playPosition[0])
{
mappic[road[playPosition[index]]].Image = imageList1.Images[2];
}
else
{
mappic[road[playPosition[index]]].Image = imageList1.Images[index];
}
Tall(String.Format(" {0} ", playName[index]));
break;
default:
Tall(String.Format(" ,{0} {1} , {2} ", playName[index], shaizi[index], playName[1 - index]));
break;
}
if (playPosition[0] != -1)
{
plan1.Controls.Clear();
}
if (playPosition[1] != -1)
{
plan2.Controls.Clear();
}
}
else
{
//
playStand[index] = playPosition[index];
playPosition[index] += shaizi[index];
if (playPosition[index] >= 99)
{
MessageBox.Show(playName[index] + " ");
playPosition[index] = 99;
//
Change(index);
return;
}
Tall(string.Format("{0} {1} ", playName[index], shaizi[index]));
//
Change(index);
//
if (playPosition[index] == playPosition[1 - index])
{
playPosition[1 - index] = 0;
playStand[1 - index] = playPosition[1 - index];
Tall(String.Format(" !{0} {1} ,{0} {2},{1} {3},", playName[index], playName[1 - index], playPosition[index], playPosition[1 - index]));
mappic[road[playPosition[index]]].Image = imageList1.Images[index];
mappic[road[playPosition[1 - index]]].Image = imageList1.Images[1 - index];
Tall(string.Format("{0} ", playName[1 - index]));
}
switch (mapList[road[playPosition[index]]])
{
case 1:
Tall(string.Format("{0} ! {1}", playName[index], playPosition[index]));
Tall(String.Format("{0} !", playName[1-index]));
break;
case 2:
Tall(string.Format(" ,{0} , 6 , {1}", playName[index], playPosition[index]));
playStand[index] = playPosition[index];
playPosition[index] -= 6;
Change(index);
/*Tall(string.Format("{0} {1}", playName[index], playPosition[index]));*/
Tall(string.Format("{0} ", playName[1 - index]));
break;
case 3:
Tall(String.Format(" !{0} , 6 ! {1}", playName[index], playPosition[index]));
playStand[index] = playPosition[index];
playPosition[index] += 6;
Change(index);
/*Tall(string.Format("{0} {1}", playName[index], playPosition[index]));*/
Tall(string.Format("{0} ", playName[1 - index]));
break;
case 4:
Tall(string.Format(" ,{0} , ", playName[index]));
re[index] = true;
re[1 - index] =false;
break;
case 5:
Tall(string.Format(" ,{0} , ! {1}", playName[index], playPosition[index]));
playStart[index] = true;
playStart[1 - index] = false;
Tall(string.Format("{0} !", playName[index]));
break;
case 6:
Tall(string.Format(" !{0} , ! {1}", playName[index], playPosition[index]));
DialogResult result = MessageBox.Show(" !", " ", MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
int temp = playPosition[index];
playPosition[index] = playPosition[1 - index];
playPosition[1 - index] = temp;
playStand[index] = playPosition[index];
playStand[1 - index] = playPosition[1 - index];
mappic[road[playPosition[index]]].Image = imageList1.Images[index];
mappic[road[playPosition[1 - index]]].Image = imageList1.Images[1 - index];
}
Tall(string.Format("{0} {1},{2} {3}", playName[index], playPosition[index], playName[1 - index], playPosition[1 - index]));
Tall(string.Format("{0} 。", playName[1 - index]));
break;
case 7:
Tall(string.Format(" !{0} , 3 ! {1}", playName[index], playPosition[index]));
DialogResult res = MessageBox.Show(" !", " !", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
playStand[1 - index] = playPosition[1 - index];
playPosition[1 - index] -= 3;
mappic[road[playPosition[1 - index]]].Image = imageList1.Images[1 - index];
Change(1 - index);
}
/* Tall(string.Format("{0} 3 ! {1}", playName[1 - index], playPosition[1 - index]));*/
Tall(string.Format("{0} 。", playName[1 - index]));
break;
default:
break;
}
if (re[index] && !re[1 - index])
{
playStart[index] = true;
playStart[1 - index] = false;
re[index] = false;
re[1 - index] = false;
}
}
}
private void Change( int index)
{
//
if (playPosition[1] == playPosition[0])
{
mappic[road[playPosition[index]]].Image = imageList1.Images[2];
}
else
{//
mappic[road[playPosition[index]]].Image = imageList1.Images[index];
}
// , , ,
if (playStand[0]==playStand[1]&&playStand[0]!=-1&&playStand[1]!=-1&&playPosition[1-index]==0)
{
mappic[road[playStand[index]]].Image = imageList1.Images[1 - index];
mappic[road[playPosition[index]]].Image = imageList1.Images[ index];
}
else //
{
switch (mapList[road[playStand[index]]])
{
//
case 0:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/water.gif");
break;
//
case 1:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/grass.png");
break;
case 2:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/sk.jpg");
break;
case 3:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/xj.jpg");
break;
case 4:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/xianjing.jpg");
break;
case 5:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/xx.jpg");
break;
case 6:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/jh.jpg");
break;
case 7:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/sq.jpg");
break;
case 10:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/start.png");
break;
case 11:
mappic[road[playStand[index]]].Image = Image.FromFile("../../img/end.bmp");
break;
}
}
}
void Tall(string str)
{
MessageBox.Show(str);
tall.AppendText(str+"\r
");
}
//
void Init()
{
//
CreateMap();
//
CreateGear();
for (int i = 0; i < mapList.Length; i++)
{
//
PictureBox pic = new PictureBox();
// 30
pic.Size = new Size(size, size);
// mapList
switch (mapList[i])
{
//
case 0:
pic.Image = Image.FromFile("../../img/water.gif");
break;
//
case 1:
pic.Image = Image.FromFile("../../img/grass.png");
break;
case 2:
pic.Image = Image.FromFile("../../img/sk.jpg");
break;
case 3:
pic.Image = Image.FromFile("../../img/xj.jpg");
break;
case 4:
pic.Image = Image.FromFile("../../img/xianjing.jpg");
break;
case 5:
pic.Image = Image.FromFile("../../img/xx.jpg");
break;
case 6:
pic.Image = Image.FromFile("../../img/jh.jpg");
break;
case 7:
pic.Image = Image.FromFile("../../img/sq.jpg");
break;
case 10:
pic.Image = Image.FromFile("../../img/start.png");
break;
case 11:
pic.Image = Image.FromFile("../../img/end.bmp");
break;
}
//
pic.SizeMode = PictureBoxSizeMode.StretchImage;
mappic[i] = pic;
//
pic.Left = i % 30 * size;
pic.Top = i / 30 * size;
map.Controls.Add(pic);
}
}
//
void CreateMap()
{
//
CreateRoad();
for (int i = 0; i < road.Length; i++)
{
mapList[road[i]] = 1;
}
//
mapList[0] = 10;
//
mapList[mapList.Length - 1] = 11;
}
//
void CreateRoad()
{
//111111
// 1
//111111
//1
//111111
// 30
for (int i = 0; i < 30; i++)
{
road[i] = i;
}
// 2
for (int i = 30; i <= 35; i++)
{
road[i] = road[i - 1] + 30;
}
//
for (int i = 36; i <65; i++)
{
road[i] = road[i - 1] - 1;
}
// 4
for (int i = 65; i <=70; i++)
{
road[i] = road[i - 1] + 30;
}
//
for (int i =71; i <100; i++)
{
road[i] = road[i - 1] + 1;
}
}
//
int[] back = { 7, 27, 42, 62, 73, 96 };
int[] forword = { 10, 25, 33, 65, 80, 88 };
int[] stop = { 3, 20, 35, 50, 60, 70, 90 };
int[] star = { 5, 28, 45, 71, 85 };
int[] change = { 4, 55, 75, 98 };
int[] gun = { 11, 32, 66, 83 };
//
void CreateGear()
{
for (int i = 0; i < back.Length; i++)
{
//
mapList[road[back[i]]] = 2;
}
for (int i = 0; i < forword.Length; i++)
{
mapList[road[forword[i]]] = 3;
}
for (int i = 0; i < stop.Length; i++)
{
mapList[road[stop[i]]] = 4;
}
for (int i = 0; i <star.Length; i++)
{
mapList[road[star[i]]] = 5;
}
for (int i = 0; i < change.Length; i++)
{
mapList[road[change[i]]] = 6;
}
for (int i = 0; i < gun.Length; i++)
{
mapList[road[gun[i]]] = 7;
}
}
}
}
이상 은 c\#작 성 된 간단 한 비행 바둑 게임 의 상세 한 내용 입 니 다.c\#비행 바둑 게임 에 관 한 자 료 는 다른 관련 글 을 주목 하 세 요!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
C#Task를 사용하여 비동기식 작업을 수행하는 방법라인이 완성된 후에 이 라인을 다시 시작할 수 없습니다.반대로 조인(Join)만 결합할 수 있습니다 (프로세스가 현재 라인을 막습니다). 임무는 조합할 수 있는 것이다. 연장을 사용하여 그것들을 한데 연결시키는 것이...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.