Hi Niko,
First of all, I think your code is a little bit confusing. The aim of Object Oriented Programming with clases is to get a clear structure but you created a class "Bet" that contains the class "Player" and vice versa. Usually in OOP objects (classes) represent objects of our real world with properties, fields and methods. Properties describe an object's status, charackteristics etc. (e.g. an object "Person" can have the property "age") Methods are what an object is able to do (e.g. the "Person" can "walk()" or something else) so it makes sence to stick to that: a "Bet" is not a person or thing that can do anything but a "Player" is someone who can:
public static void winOrLooseMoney(int dog)
so you could define this method in your player class. All procedures to increase or decrease money can be declared here and the class "Bet" just contains the amount of the bet and the dog as fields or properties. And every Player has a "playersBet"
public static void winOrLooseMoney(int dog)
{
if ( dog == playersBet.dog)
{
Money = Money + 2 * playersBet.amount;
}
else
{
Money = Money - playersBet.amount;
};
}
In your Main Routine you can use the Random function or whatever you like to get the winning dog and call
Player1.winOrLooseMoney(randomValue);
If anything isn't clear write back, please.
The difference between a field and a property is: fields are just like usual variables that belong to a class (they should be private - just internal use) a property can be read or written only by functions you have to define. This can guard against logical errors in complex code (For Examples see MSDN reference - very good for c#)
Regards Martin
Edit: And check your code: there are some syntax errors ;)