Do you still have Let It Ride game?
Because what i wonder is do I have to transfer Game.cs and Player.cs to CSC 253 Casino game?
Also for example when its public void MethodName(Class parameter)
the parameter takes the value and uses the Class's constructor?
for example public void AddCard(GraphicalCard card)
whatever value is assigned to card goes to GraphicalCard constructor?
Loading
VulpesPosted Mar 28, 2012, 1:26 PM
The only thing that will be different is that you'll be launching the application from the link labels in the Casino form, rather than from the Main method in the Program class.
Also when a game closes, it should take you back to the Casino form in case you want to play another one.
Prime bPosted Mar 28, 2012, 3:59 PM
Suthish NairPosted Mar 28, 2012, 3:58 PM
VulpesPosted Mar 28, 2012, 2:50 PM
public void AddCard(GraphicalCard card)
{
// code
}
you need to pass it a GraphicalCard object.
So the GraphicalCard's constructor will already have been called before a reference to it is passed to the method. For example:
GraphicalCard card = new GraphicalCard(); // ignoring any parameters needed by the constructor
AddCard(card);
The method can then do what it needs to do with that object including changing its properties.
Prime bPosted Mar 28, 2012, 2:12 PM
Also for example when its public void MethodName(Class parameter)
the parameter takes the value and uses the Class's constructor?
for example public void AddCard(GraphicalCard card)
whatever value is assigned to card goes to GraphicalCard constructor?
I am just wonder how the method works in general, if it has class name and a parameter in it, you know what i mean? Tell me if you don't understand, ill try to explain
Prime bPosted Mar 28, 2012, 1:15 PM
VulpesPosted Mar 28, 2012, 12:48 PM