10/11/18 13:23:17
>>83
チェックしてないけど
int is_straight(struct card h[]) {
int i, j, dist[14];
distrib(h, dist);
for(i = 1; dist[i] == 0; i++);
if(i == 1) {
for(j = 10; j <= 13; j++) if(dist[j] != 1) break;
if(j > 13) return 1; }
for(j = 0; j < 5; j++) if(dist[i + j] != 1) return 0;
reutrn 1; }
int is_flush(struct card h[]) {
int i;
for(i = 1; i < 5; i++) if(h[0].suit != h[i].suit) return 0;
return 1; }
int is_fullhouse(struct card h[]) {
int i, dist[14];
distrib(h, dist);
for(i = 1; i <= 13; i++) if(dist[i] == 1 || dist[i] == 4) return 0;
return 1;
}