Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   C# Dice Roll Program With Images (http://www.go4expert.com/forums/c-sharp-dice-roll-program-images-t27912/)

Pylons 29Feb2012 05:35

C# Dice Roll Program With Images
 
Hi, i am trying my best to do this program which is to make a program that lets the user to roll two dices as many as it wants, but the dices rolled can not be shown as numbers but as a image.
such as
_____________
l O O l
l O O l
l___O___ O__ l
for a dice roll of 6.

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!

Code:

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);
             
            }




           
        }
    }
}



All times are GMT +5.5. The time now is 19:52.