Go Fish/OCaml: Difference between revisions
Content added Content deleted
(Created page with '{{collection|Go Fish}}Category:OCaml <lang ocaml>type pip = Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King | Ace let pips = …') |
No edit summary |
||
Line 199: | Line 199: | ||
*) |
*) |
||
opponent <- List.sort (fun _ _ -> Random.int 9 - Random.int 9) opponent; |
opponent <- List.sort (fun _ _ -> Random.int 9 - Random.int 9) opponent; |
||
match ranks with |
|||
| [] -> Jack |
|||
| (x,_)::_ -> x |
|||
method give_cards (_cards : card list) = |
method give_cards (_cards : card list) = |