Posted By: brownsoft | Jun 20th, 2005 @ 5:37 PM
page 1 of 1
Comments: 10 | Views: 7019 | Downloads: 17
Download:Link for RollDice.NET(0 Bytes)
Hello,
    RollDice.NET is a simple DiceRoller written in C# .NET 1.1  Its a simple app for Gamemasters/Players to use either for online games or any times you rather have a app roll the dice instead of doing it yourself..Smiley

    I wrote this to learn how to program using C#. I mostly work in Java and decided to check this language out and I feel quite at home since its almost a seemless transition from Java to C#.

Note: I have updated the implementation of the base class to this diceroller.  I was using a simple int array to hold the informaton but i decided that using an ArrayList makes it so much easier to use. 

It still built with .NET 1.1.  I have posted the source to my application on my website at clutterdump.com Please post any comments about this app.


Maurits
Maurits
AKA Matthew van Eerde
Can you post the source?
brownsoft wrote:
Once I touched it up.  It still real rough for consumption.  What are you looking for in the souce?? If you need any questions answered, just let me know.

It's not that we want to see the source, it's that we crave to see the source! Smiley We're basically an MS community thats against open source software, yet when it comes to the sandbox it's all about the open sourcing baby! Smiley

Also it's fun to see how other coders find their way around a project. That way we can compare our methods to theirs and learn something, ya know? Smiley

I wanna' be a Jedi.
Steve.
Maurits
Maurits
AKA Matthew van Eerde
brownsoft wrote:
Once I touched it up.  It still real rough for consumption.  What are you looking for in the souce?? If you need any questions answered, just let me know.


I'm just paranoid.  If I step through the source I can keep an eye on what it's doing.
PerfectPhase
PerfectPhase
"This is not war, this is pest control!" - Dalek to Cyberman
Maurits wrote:
brownsoft wrote: Once I touched it up.  It still real rough for consumption.  What are you looking for in the souce?? If you need any questions answered, just let me know.



I'm just paranoid.  If I step through the source I can keep an eye on what it's doing.



You take paranoia to a whole new level Smiley

Stephen

brownsoft wrote:
Just out of courosity,
    Are you realling against open source software?? If so why??? Open Source has some advantages and yes it does have disadvantages.
    BTW: I have now uploaded the source.

I am, a bit. I can't speak on everyone elses behalf though.
Maurits
Maurits
AKA Matthew van Eerde
I'm getting a stack overflow error... I'll try to isolate it.  Running VS 2002 on this machine.


EDIT:
'K, it's here:
RollDiceBase.cs line 109
 

       public String diceString

        {

            get 

            { 

                if (diceString.Equals("") == true) /* this line */

                {

           
        return (NumberTimes.ToString() +
"D" + WhichDice.ToString()); 

                }



EDIT2: OK, here's the fixed property get method
(it is somewhat dangerous to have a property and a private member that differ only in case...)

        public String diceString

        {

            get 

            { 

                if (DiceString.Equals("") == true)

                {

           
        return (NumberTimes.ToString() +
"D" + WhichDice.ToString()); 

                }

                else if (DiceString == null)

           
        throw new
NullReferenceException("DiceString has not been initialized yet!");

                else

                    return DiceString;

            }

        }



EDIT3: Looks very nice.