我想知道是否有人知道如何在java中实现代码来打印所有满屋子的情况。大约有3700个不同的案例。到目前为止,我大约 2700,但我无法更换西装,她是我目前所拥有的。
public class FullHouseTest
{//
static int count = 1;
static int [] cards ={1,2,3,4,5,6,7,8,9,10,11,12,13};
static int[] suit ={1,2,3,4};
static int[] suit2 ={2,3,4,1};
static int[] suit3 ={3,4,1,2};
public static void main(String[] args)
{
for(int k = 0; k< 12; k++)
{
for(int i = 0; i < 3; i++)
{
for (int t = 0; t <3; t++)
{
Card one = new Card(new Suit(suit[t]), new Pips(cards[k]));
Card two = new Card(new Suit(suit2[t]), new Pips(cards[k]));
Card three = new Card(new Suit(suit3[t]),new Pips(cards[k]));
for (int j =0; j < 12; j++)
{
Card four = new Card(new Suit(suit2[i]), new Pips(cards[j+1]));
Card five = new Card(new Suit(suit[i]), new Pips(cards[j+1]));
System.out.println("Hand:" + count + " | " + one + two + three + four + five);
count ++;
}
}
}
}
for(int i = 0; i < 3; i++)
{
for(int k = 0; k< 12; k++)
{
for(int s = 0; s<3; s++)
{
Card one = new Card(new Suit(suit[i]), new Pips(cards[k]));
Card two = new Card(new Suit(suit2[i]), new Pips(cards[k]));
for (int j =0; j < 12; j++)
{
Card three = new Card(new Suit(suit3[s]),new Pips(cards[j+1]));
Card four = new Card(new Suit(suit2[s]), new Pips(cards[j+1]));
Card five = new Card(new Suit(suit[s]), new Pips(cards[j+1]));
System.out.println("Hand:" + count + " | " + one + two + three + four + five);
count ++;
}
}
}
}
}
}