Go Fish/Julia: Difference between revisions
Content deleted Content added
mNo edit summary |
m link |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
See [[Go_Fish]]
<lang julia>import Base.show▼
const sorteddeck = reshape([string(r == 'T' ? "10" : r) * s for r in "23456789TJQKA", s in "♣♦♥♠"], 52)
Line 73 ⟶ 75:
end
crd = popfirst!(maindeck.cards)
d.cards = sort(push!(d.cards, crd))
if display
println("You drew a ", Deck([crd]))
Line 189 ⟶ 191:
end
gofish()</syntaxhighlight>
|