Uno (Card Game)/Julia: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
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!")
|