Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Tezigudo/Card_game

Repository files navigation

Card Game

This project was made for computer Programming I Acedemic year 2021 by Preawpan Thamapipol

About this project

This Card Game include 2 main game including Pok Deng and Black Jack game. In every game user will input all player's name then a list of player object will be created by name in that list. then lets play, the game will loop untill has only one player who has money more than 0. in the other hand,all people except that guy have no money anymore (less than 0). When a game start the graphical output will show each player hand. At the end, The game will show the winner and update score into CSV file.


Project overview and features

Main features

  • play BlackJack
  • play Pokdeng

At first Program will ask user what game to play whether BlackJack or PokDeng as picture below

start_game

for Example, I will choose blackJackGame

just_started

if I selected show rule

rule

and This is overview of blackjackgame

play play1

graphic is used to show player hand as shown below play2

and if I choose to see wincount, it will be same as below play3


** NOTE **

screen here is the full screen but real canvas size is 600 x 420. So, the picture above is look so disproportionate


Requirement

This is requirement for this project

python version

module

NOTE Reccomand to run via terminal because it will better color quality(in rich module)


Program design

All my class that I am going to implement are

  1. Card: a deck of card

  2. Player: Parent Class of Each game player

  3. BlackJackPlayer: BlackJackPlayer (child class of Player)

  4. PokDengPlayer: PokDengplayer (child class of Player)

  5. BaseGame: Parent Class of each game/ every game should have its

  6. BlackJack.Computer_Player: BlackJack's computer player (child class of BlackJackPlayer)

  7. Black_Jack.Game: BlackJack main game (child class of BaseGame)

  8. Pok_deng.Computer_Player: PokDeng's computer player (child class of PokDengPlayer)

  9. Pok_deng.Game: PokDeng main game (child class of BaseGame)

  10. Save: database of the game which write data(name and money and win count) into CSV file.

  11. Screen: Display a player hand screen with turtle graphic


Code structure

In my card Game Project have 9 main file which are

  1. Card.py: module for BaseGame that contain Card class

  2. Hand.py: module file for Player that contain Screen class that illustrate each player hand

  3. Player.py: module file that contain all type of Player including Player, BlackJackPlayer, and PokDengPlayer class

  4. BaseGame.py: module file for anygame that contain BaseGame class

  5. Black_Jack.py: sub file that are one BlackJack entile game which contain Black_Jack.ComputerPlayer and Black_Jack.Game class and main function for run a entire BlackJack game

  6. Pok_Deng.py: sub file that are one PokDeng entile game which contain Pok_Deng.ComputerPlayer and Pok_Deng.Game class and main function for run a entire Pok Deng game

  7. database.py: module file that contain Save class

  8. history.csv: CSV file for collecting data in database

  9. main.py: main file that run entire thing


About

Nothing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages