Create And Deal A Deck Of Cards - PyQt5 GUI Thursdays #45

Published: 20 January 2022
on channel: Codemy.com
6,236
112

In this video I'll show you how to create a deck of cards with images for PyQt5 and Python.

After we create our deck of cards, we'll shuffle the cards and deal them out to a dealer and a player.

Each player will get one card at a time. We can then shuffle out more cards until the deck is empty.

We'll keep track of which player has which cards.

#pyqt5 #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:37 - Create GUI With PyQT5 Designer
8:16 - Import Widgets
8:41 - Define Widgets
11:50 - Create Button Clicks
12:24 - Create Shuffle And Deal Functions
13:16 - Create Deck Of Cards
14:44 - Add Cards To Deck
16:30 - Import Random
16:45 - Create Dealer And Player
17:05 - Deal Random Card From Deck To Dealer
17:24 - Remove Card From Deck
17:51 - Assign Card To Player
18:10 - Import QPixmap
18:47 - Set Path To Card Image
19:36 - Show Card On Screen
20:13 - Shuffle Player Card
20:36 - Show Card Count In Title
21:22 - Shuffle Cards On Start
22:03 - Deal Cards In Try Block
24:31 - Conclusion


Watch video Create And Deal A Deck Of Cards - PyQt5 GUI Thursdays #45 online without registration, duration hours minute second in high quality. This video was added by user Codemy.com 20 January 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6,236 once and liked it 112 people.