such as
[0]
for a dice roll of 1.
i havent made the loop code for the program yet and i only know how to make the random numbers for the rolls, i just can't figure out how to make the arraylist for the images and make the code to actually use the images instead of numbers... if you know what i mean.
here is my code so far, thanks for the help!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DiceRoll Game
{
class Diceroll
{
static void Main(string[] args)
{
int[] DiceUno = new int[6];
int[] DiceDos = new int[6];
Random rnd = new Random();
Console.WriteLine("This program will allow you to roll two dices");
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);
}
}
}
}

New Topic/Question
Reply


MultiQuote






|