Uno (Card Game)/Julia: Difference between revisions
m
Fixed syntax highlighting.
m (Fixed syntax highlighting.) |
|||
(One intermediate revision by one other user not shown) | |||
Line 2:
Gtk based graphical version.
<
#=========== Channel and flag (IPC) section ===================#
Line 97:
hands = [deck[i:i+6] for i in 1:7:27]
game = UnoCardGameState(drawpile, discardpile, [UnoCardGamePlayer(playernames[i], 0,
startswith(playernames[i], "Bot")
for i in 1:length(playernames)], 1, "Wild", "Wild", true, true)
dealer = rand(1:length(playernames))
Line 152:
# bot will challenge half the time, player must challenge in 5 seconds.
if game.players[game.pnow].isabot && rand() < 0.5 ||
(!game.players[game.pnow].isabot && challenge[begin]
challenge[begin] = false
logline("$(game.players[game.pnow].name) challenged Draw Four!")
Line 536:
end
UnoCardGameApp()</syntaxhighlight>
|