IE : I'm making poker:
int returnHandValue(){
if (RoyalFlush() == true){
System.out.println("RoyalFlush");
return 9;
}else if (StraightFlush() == true){
System.out.println("StraightFlush");
return 8;
}else if (FourKind() == true){
System.out.println("Four Kind");
return 7;
}else if (FullHouse() == true){
System.out.println("Full house");
return 6;
}else if (Flush() == true){
System.out.println("Flush");
return 5;
}else if (Straight() == true){
System.out.println("Straight");
return 4;
}else if (Triples() == true){
System.out.println("Triples");
return 3;
}else if (TwoPair()== true){
System.out.println("TwoPair");
return 2;
}else if (Pair() == true){
System.out.println("Pair");
return 1;
}else{
System.out.println("Nothing");
return 0;
}
}
EDIT: Inserted code tags, PennyBoki. Please
So we got this method and it will return a value to another part of my code and is all i want the return value to do is load into an array when it returns. Lets say my array is called handValues[i] how do i make handValues[i] become the value of return??
Hope you understand what I'm talking about
Thanks Brad.
This post has been edited by PennyBoki: 01 April 2010 - 01:41 AM
Reason for edit:: code tags

New Topic/Question
Reply




MultiQuote




|