我正在尽我所能做这个程序,它是让程序,让用户滚动两个骰子尽可能多,但骰子滚动不能显示为数字,但作为数字,但作为一个图像。C#骰子滚动程序与图像
如
[O]
为1.
模具辊我还没有作出该程序的循环代码但只知道如何使随机数的我只是无法弄清楚如何制作图像的数组列表,并让代码实际使用图像而不是数字......如果你知道我的意思。
这是我的代码到目前为止,感谢您的帮助!
int[] DiceUno = new int[6];
int[] DiceDos = new int[6];
Random rnd = new Random();
Console.WriteLine("This program will allow you to roll two dice");
Console.WriteLine("\nAs many times as you want");
Console.WriteLine("\n\nWhen you want to exit the program, please type (exit)");
Console.WriteLine("\nPress any key to begin rolling");
Console.Read();
for (int i = 0; i < 1; i++)
{
int diceRoll = 0;
diceRoll = rnd.Next(6);
DiceUno[diceRoll]++;
Console.WriteLine("Dice 1 is rolled a: {0}", diceRoll + 1);
diceRoll = rnd.Next(6);
DiceDos[diceRoll]++;
Console.WriteLine("Dice 2 is rolled a: {0}", diceRoll + 1);
}
}
}
}
我不能帮助编码,但死亡的复数是骰子。骰子没有意义。把它丢去外面。 – 2012-02-29 00:00:19
那些真正的图像还是只是在数字的周围画出括号? – 2012-02-29 00:31:01
我也是这么认识的。忽略我的答案,如果你的意思是像jpegs的实际图像,而不仅仅是ascii图像。 – 2012-02-29 00:32:21