diff --git a/__pycache__/card.cpython-311.pyc b/__pycache__/card.cpython-311.pyc new file mode 100644 index 0000000..3d49bc4 Binary files /dev/null and b/__pycache__/card.cpython-311.pyc differ diff --git a/card.py b/card.py new file mode 100644 index 0000000..f2a2bd2 --- /dev/null +++ b/card.py @@ -0,0 +1,15 @@ +#module defines the value of the card. +#the cards in blackjack have a range in value from 1-10 with a face card being worth 10 and an ace being worth 1 or 11 depending on what you choose it to be worth. +from random import randint + +class Card: + def __init__(self): + self.deal() + + def __str__(self): + return str(self.face) + + def deal(self): + self.face = randint(1, 11) + return self.face + diff --git a/cardgame.py b/cardgame.py new file mode 100644 index 0000000..7660c23 --- /dev/null +++ b/cardgame.py @@ -0,0 +1,3 @@ +import retro +#main code used to start the game. +state = {} \ No newline at end of file diff --git a/deal.py b/deal.py new file mode 100644 index 0000000..ab23d9d --- /dev/null +++ b/deal.py @@ -0,0 +1,2 @@ +import retro +#code will be used to deal out cards for each player playing depending on the game played. diff --git a/dealer.py b/dealer.py new file mode 100644 index 0000000..4f25141 --- /dev/null +++ b/dealer.py @@ -0,0 +1,19 @@ +import retro +from card import Card +#this code will be for creating a player to play against or to deal cards and to ask about your next action to continue the game. +#this code will be the agent refered to as dealer for now. + +def deal_first: + dealer_hand=[] + player1_hand=[] + + #deal two cards to the dealer one up and one down + dealer_show = Card() + print("dealer shown card:"+ dealer_show) + dealer_hand.append(dealer_show) + dealer_hidden = Card() + print("▮") + dealer_hand.append(dealer_hidden) + + #deal two cards to the player (both showing since it's one player) + diff --git a/draw.py b/draw.py new file mode 100644 index 0000000..8ec96c5 --- /dev/null +++ b/draw.py @@ -0,0 +1,3 @@ +import retro +#this code will allow the player to draw cards from the deck of cards. + diff --git a/proposal.md b/proposal.md new file mode 100644 index 0000000..e40a038 --- /dev/null +++ b/proposal.md @@ -0,0 +1,8 @@ +group: indivually +game name: quick card games +vision for the game and reason for making it:A card game can take a bit to set up sometimes and it isn't always easy to carry a deck of cards around.If it was digital them them you wouldnt need to carry a deck of cards around and worry about losing them. +visual appearence:The game will appear similiar to a group of people playing on a table with a deck cards(the draw pile),a dealt amount of cards that vary depending on the game chosen and a table with the cards on it. +how the player will interact with the game:The player will choose a card game with a estimated amount of time that the game takes to finish(if possible).Once chosen you can decide to either play with a second player or against the ai so it can be played by yourself.You will then be dealed a set amount of cards depending on the game chosen.You will then select the card to play or draw from the deck. +core mechanics:depending on the game chosen your actions will vary but the 2 that are important are selecting your card to play and drawing from the deck.Some games you will play to eithier get the least amount of cards while others will be to have a number within a set range. +first goal to achieve:The first step in developing the code is to define the value of each card to make the cards drawn random. +challenges:The challenge is going to be creating a code for Ai to allow a single person to play without needing another person to play the game.Another one would be to create a method to prevent another person from being able to see someone else cards. \ No newline at end of file diff --git a/shuffle.py b/shuffle.py new file mode 100644 index 0000000..2310141 --- /dev/null +++ b/shuffle.py @@ -0,0 +1,2 @@ +import retro +#code used to shuffle the cards in a deck to keep each game different and not as predictable.