CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: jmcewan

Search: Search took 0.03 seconds.

  1. Replies
    24
    Views
    4,491

    Re: Probability Function

    Saw it, it is great stuff. I think I will use this method to simulate the game engine.
  2. Replies
    5
    Views
    1,366

    Re: Game simulation

    Found it!!! Gonna give it a read and let you know. Thanks man.
  3. Replies
    24
    Views
    4,491

    Re: Probability Function

    Perhaps credit the defender with +1 steal and change possession. Sounds like the perfect implementation of Finite State Machines.

    I'm looking into another possible way to achieve what I want. I...
  4. Replies
    24
    Views
    4,491

    Re: Probability Function

    How would you then use the result?
  5. Replies
    5
    Views
    1,366

    Re: Game simulation

    The 'stamina' attribute would be a great addition. Also, I would like to put in a 'toughness' attribute that would determine how prone a player is to injury as well as how long it takes for him to...
  6. Replies
    5
    Views
    1,366

    Re: Game simulation

    Thanks for replying rliq. I fully intend to incorporate player stats into the mix I'm just not sure how to make the stat's interact with each and simulate "life-like" statistics. The computer would...
  7. Replies
    5
    Views
    1,366

    Game simulation

    Hello all,

    I'm working on a text-based basketball game and I would like to know of the possible options I could use to simulate games with realistic stats. For instance, if a team wins a game 104...
  8. Replies
    24
    Views
    4,491

    Re: Probability Function

    I forgot to put in the (-25) roll penalty for the StealChance, however you have a general idea of what I've accomplished.
  9. Replies
    24
    Views
    4,491

    Re: Probability Function

    Hello again,

    Just and update. I've managed to create the function without any shortcomings. I did it as follows:

    StealChance = RandomClass.Next() % 96
    BallHandlingChance = RandomClass2.Next()...
  10. Replies
    24
    Views
    4,491

    Re: Probability Function

    You are right....the answer was right there. I understand now. The problem I was having is thinking that a percentage value should be the answer whereas it should help to form the solution.

    Thanks...
  11. Replies
    24
    Views
    4,491

    Re: Probability Function

    I really haven't been programming long so I'm not sure what I am suppose to be seeing. I must admit, I do feel a little foolish right now for not being able to come up with an answer.
  12. Replies
    24
    Views
    4,491

    Re: Probability Function

    Then perhaps have a nested IF to say whether a Steal occurred or not.
  13. Replies
    24
    Views
    4,491

    Re: Probability Function

    I was responding to dglienna's comment.

    I do understand what you are saying, I'm just not sure I want to randomize the numbers. That would mean I would randomize (using the above example) the...
  14. Replies
    24
    Views
    4,491

    Re: Probability Function

    Okay. I'm not sure where to start though.
  15. Replies
    24
    Views
    4,491

    Re: Probability Function

    Yes. Perhaps I can explain myself better with an example:

    Imagine a basketball game where players move/act based on stats. A defender may have his STEAL rating at 94, and the offensive player has...
  16. Replies
    24
    Views
    4,491

    Probability Function

    Hello all,

    Is there a function that calculates the probability (in percentage) of an argument? I understand that this comment maybe a little vague, however I've only recently began programming so...
Results 1 to 16 of 16





Click Here to Expand Forum to Full Width

Featured