none
Need help for a betting game -

    Question

  • Hi guys, Recently i have been trying out new things using C#, and i was wondering how i could make a betting game. I want the program to calculate the Speed (1-10) and endurance (1-10) of 5 horses, and calculate a winner. I want the program to be able to store the 5 horses which will be used to race over and over again, with the horses form constantly upgrading as more races take place. I want the horses stats to appear, and determine the odds for each horse to win the race, and then after the race takes place the program to have the order of the 5 horses.

    so far this is what i have, but i have completely blanked.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace ConsoleApplication1
    {
        class Horse             //Parent Class
        
        {
            private int H_Speed; // From Level 1 to 10, 1 is slowest
            private int H_Endurance; // From Level 1 to 10, 1 is weakest

            public Horse()    //Default Constructor
            {
                H_Speed = 0;
                H_Endurance = 0;
            }
            public Horse(int initialSpeed, int initialEndurance);  //Overload Constructor
        
            H_Speed = initialSpeed;
            H_Endurance = initialEndurance;
        }
      }
                                 

    Any coding would be greatly appreciated. 

    Travis michaels.


    • Edited by jRanks Wednesday, August 22, 2012 8:05 AM
    Tuesday, August 21, 2012 1:02 AM

All replies

  • Hi jRanks,

      Welcome to MSDN Forum Support.

      We're doing research on this issue. It might take some time before we get back to you.

     

      Sincerely,

      Jason Wang



    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 22, 2012 3:00 AM
  • Hi jRanks,

    I will be very glad to help you solve the problem.  But could you please explain the logic of the horse game more clearly?  

    Good day!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 22, 2012 2:04 PM
  • So what problems are you having?  What don't you know how to do?  It's not really realistic for us to provide you with an entire working application...
    Wednesday, August 22, 2012 4:06 PM
  • Sorry guys went away for a bit. 

    I thought it was pretty clear but my english must not be as good as yours. The game needs to be able to store a group of variables (The horses), and as the game goes on the horses "Improve" per-say. The horses/variables will all have a score out of 20, and thats separated between Endurance and Speed, both being scored outta 10.  

    This much so far would be gladly useful. Ask if anymore info is needed :) 

    Travis Michaels.

    Wednesday, August 29, 2012 11:59 AM
  • Sorry guys went away for a bit. 

    I thought it was pretty clear but my english must not be as good as yours. The game needs to be able to store a group of variables (The horses), and as the game goes on the horses "Improve" per-say. The horses/variables will all have a score out of 20, and thats separated between Endurance and Speed, both being scored outta 10.  

    This much so far would be gladly useful. Ask if anymore info is needed :) 

    I'm not saying your requirements are unclear, I'm asking why you can't implement those requirements yourself.  Are you under the impression that this is a free coding service where we will do all of your work for you on request?  If there is something you don't understand how to do, or that is giving you significant problems despite spending a lot of time trying to work on it then describe what specific aspect of the program you are having trouble with and what you have tried so far that isn't working.  We will then be able to help you resolve those issues so that you can solve the problem yourself.
    Wednesday, August 29, 2012 1:57 PM
  • Is your question one or both of the following?
     
    1) How to store the horses somewhere?
    I would use a database, without any further info to go on...
     
    2) How to have the horses "improve" as the game progresses?
    I would add an attribute which is "experience" with which their scores for speed and endurance improve.  Of course, after some point, their experience makes them old and weak...

    --
    Mike
    Wednesday, August 29, 2012 9:21 PM