Share your repls and programming experiences

← Back to all posts
Uno!
Muffinlavania (1169)

After a lot of work, some messed up graphics, and an infinite deck, I have made...

Uno in python!

For everyone who does not know how to play, i just added some rules! They will display quite quickly, but dont worry, it will wait for you to hit enter to clear. This took a lot of time to make, so hopefully you enjoy!

Also to anyone who reads this, you can say the position of the card instead of th card name!

Like in Red 6, Red 7, Blue 8 : Red 6 would be 1, Red 7 would be two and so on


For everyone who wants to, you can fork this project, copy the code or whatever, but please dont say that you made it!


EDIT:

The Uno Stonks are out the roof, but continue to give positive feedback, i am still fixing things in the game
Everyone is absolutely loving this, so if you have any suggestions, even if its something small, comment it down below!

Fixed Things:

Lowercase letters are now working! You can say red 6 instead of Red 6!

The Game is now infinite! When losing or winning, why not play again?

All of you wanted it, so now

The Wild Card is working!


Not really a bug, but some of you are like this:

So it no longer gives an error if you smash your keyboard while picking a card


Win screen now works!
The win screen used to just not show up, but now it should for everyone

This post has been locked
Commentshotnewtop
JosephSanthosh (1180)

The Muffin Boi is alive once again!

PattanAhmed (1102)

@JosephSanthosh Oh...
You made a Typo.

It was The Muffin Boi
Ask @Muffinlavania for evidence.
LoL!


PattanAhmed (1102)

@JosephSanthosh Ok


Hello @Muffinlavania...
Should we call you The Muffin Man or The Muffin Boi?

Muffinlavania (1169)

@PattanAhmed which do you prefer? I will change my name accordingly.

PattanAhmed (1102)

@Muffinlavania Ah...
I prefer The Muffin Boi only.

So, just keep it.

JosephSanthosh (1180)

Ok I will change it accordingly. @PattanAhmed

AustinZhang1 (52)

Wild card doesn't work

Muffinlavania (1169)

@AustinZhang1 Wild Card is VERY buggy, i will try to fix it soon, very sorry

FluidCycling (60)

@Muffinlavania Umm the error for me is that when i say the name of the card it just bugs out!

Muffinlavania (1169)

@AustinZhang1 now the wild card is working!

HahaYes (1211)

@AustinZhang1 ye I'll try to help muffin on that

Muffinlavania (1169)

@HahaYes Can you help me pls pls meme

firefish (509)

@HahaYes so hahayes, you can? HAHANO YOU WILL NOT BE ALLOWED TO lol

Muffinlavania (1169)

@AustinZhang1 Wild Card should now work, and @FluidCycling you too!

userSM (214)

uno this game is really fun :)

AustinZhang1 (52)

Found an error:


It says Wild Card(Any)... hmmmm

SixBeeps (2993)

i like the reverse card

RichaL1 (4)

Is it possible to edit the code so that you can stack +(2, 4) cards on top of each other? (Ex. Player puts a +2, Computer stacks a +4, and then player stacks another +4, resulting in the Computer picking 10 cards)?

Muffinlavania (1169)

@RichaL1 I have actually never seen uno like that, but i have heard of it. I dont think i will add it, but maybe i will just make another version of this and include that in there

RichaL1 (4)

@Muffinlavania Oh, that's fine. That's just the way I'm used to playing UNO. I've been playing with that rule for as long as I remember.

RichaL1 (4)

@Muffinlavania Oh, that's fine. That's just the way I'm used to playing UNO. I've been playing with that rule for as long as I remember. Thank you for responding!

3941driB (37)

Bug:

I was about to win a game against the AI when the stupid game crashed because I accidentally went out of range, please fix this immediately with a try: statement

Muffinlavania (1169)

@3941driB lollllll that sucks, just try not to say the wrong thing, doing try and except and stuff like that would be very annoying, because the functions are the ones that are really doing the stuff

3941driB (37)

@Muffinlavania: um to elaborate you said you fixed going out of range but you must have done if i <= len(cards) instead of i < len(cards)

HongyiZhou (0)

@RohilPatel the perfect squeal doesn't exis-

RohilPatel (1172)

Squeeeeeeeeeeaaaak @HongyiZhou

U mean squeak lamo

Muffinlavania (1169)

@RohilPatel Ahem
No squeaks allowed! You must now kneel before Mr.Squeak while he give you your sentence

Squeak squeak squeak squeak, squeaksqueak squeaksqueak squeak, squeak squeak squeak.Squeak squeak squeakkkkkkkkkk squeak, squeak squeak squeak squeaksqueak squeak!

XanderOldham (1)

How do I play wild card? Are they different? They don’t work for me.

Muffinlavania (1169)

@XanderOldham Wild Cards should be able to play on any card, but for come reason everyone says that they dont work, so can you send me a screenshot of what is happening

XanderOldham (1)

@Muffinlavania sorry for the inconvenience, I think I posted this comment at a point where they didn’t work, or I may have not updated that tab and the game was still in a former version. Either way, it’s working now! Thanks for the concern, it’s great to know the developer cares!

Muffinlavania (1169)

@XanderOldham thanks! ANd the wild cards do work? Thanks for letting me know, so far everyone is absolutely slamming me about the Wild Cards

herbertju (3)

This is amazing! Great work.

firefish (509)

@Muffinlavania

i didn't learn that much spanish
Muffinlavania (1169)

@firefish Yo comprendo un poco español

firefish (509)

@Muffinlavania I gues that means I comprehend/understand an speak spanish, like I'm just taking similarities between english here

Muffinlavania (1169)

@firefish it means i understand a bit of spanish

firefish (509)

@Muffinlavania I know less than you then

Muffinlavania (1169)

@firefish (I mean im literally in spanish right now)

firefish (509)

@Muffinlavania

(I mean im literally in spanish right now)

I hope you mean you're in spain and not embedded inside a language

Muffinlavania (1169)

@firefish Spanish Class, im in school

firefish (509)

@Muffinlavania How on earth did they let you, it can't be allowed

FishingFights (124)

I won in 10 seconds lmao

Muffinlavania (1169)

@FishingFights whoooooooops i forgot to change it back

code913 (5)

when you throw a reversal card on time

python88 (159)

i love this game!

SkorpionKing (0)

Guys, I'm his friend and this by far is his best game ->https://audio.muffinlavania.repl.run/

Muffinlavania (1169)

@SkorpionKing (Dude with 0 cycles comments on a guys post with 1000 cycles)
GUYS IM HIS FRIEND
but yea hi jacen(exposed)

SheldonC (0)

Hey is this code on GitHub? Pls share the link!!

Muffinlavania (1169)

@SheldonC no it isnt actually... never thought of putting it on there, i just made this on my free time

SheldonC (0)

@Muffinlavania
Do create a GitHub repo for this....I can't wait to star this!!

Muffinlavania (1169)

@SheldonC i will try to create one, thanks for the advice!

YuvanVighnesh (26)

I cant even place a card lol, but i like this game

Muffinlavania (1169)

@YuvanVighnesh what do you mean? You mean its bugged or you are really unlucky

YuvanVighnesh (26)

Like when I place a card that I already have, it says that I cant place it, I can only play"n"@Muffinlavania

Muffinlavania (1169)

@YuvanVighnesh umm well you cannot place a card if it is not the same color or number as the card in play, maybe that is it?

YuvanVighnesh (26)

No, I placed the exact same card that I [email protected]

AJDevelopment (50)

thats not how math works

jesseturdface (16)

I'm stealing that print function

it's too powerful

Muffinlavania (1169)

@jesseturdface lol you mean the slow print thing? Go right ahead, also if you dont understand it: https://repl.it/talk/learn/The-Slow-Print/44741

jesseturdface (16)

@Muffinlavania I semi understand how it works, but I do know how to use it

Muffinlavania (1169)

@jesseturdface ok cool! quick rundown of it
sys.stdout.write writes the letter that you are on, without indenting
sys.stdout.flush() makes it so that the whole things works(i dont know it does it)
time.sleep(whatever) waits that tiny little delay between each character
And it is looped with a for letter in phrase at the top!

jesseturdface (16)

@Muffinlavania Nice, I just think it looks dope

aaritsri (0)

hi!.. so I tried your game, and its good and all but its not letting me place the green +2 card soooo.... yeah just try to fix that then you will be. chilling (I won't give you advice because i suck at python coding) Thanks!
sincerely,
a kid that's bad at coding

Muffinlavania (1169)

@aaritsri lol and i think if you are doing the +2 cards, the '+' sign gets all weird and such, i would just use the number for the card, like if this was your deck
Red 6, Green +2 Card, Blue 7
You would say 1 for Red 6, 2 for Green +2 Card and so on

RahulChoubey1 (18)

I love the reverse card joke…

RahulChoubey1 (18)

I placed a blue 5, and then the computer placed a blue 5 twice!

Muffinlavania (1169)

@RahulChoubey1 you mean the computer has two turns at once?

RahulChoubey1 (18)

@Muffinlavania No, they dropped one and later another(Uno should only have two of that card)

Muffinlavania (1169)

@RahulChoubey1 Yea.. i have like 4 wild cards in the deck too... i dont know the deck is huge

RahulChoubey1 (18)

It's slow in design. Sooooo slow…

RahulChoubey1 (18)

Why doesn't "nope" work?

Muffinlavania (1169)

@RahulChoubey1 because thats not "no"... its like me adding "sure" for yes, but ill add it anyway