diff --git a/.gitignore b/.gitignore index cfec52c..efdaf6b 100644 --- a/.gitignore +++ b/.gitignore @@ -151,6 +151,8 @@ static .vscode/ token.txt resources/swcharacters.json -resources/games.json +resources/games/games.json +resources/games/blackjackCards.txt resources/destinyPoints.txt +resources/games/tables/ gwendolynTest.py diff --git a/Gwendolyn.py b/Gwendolyn.py index e872b5e..18553f0 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -11,6 +11,7 @@ import random import funcs funcs.makeFiles() +funcs.shuffle() # Gets secret bot token with open("token.txt","r") as f: @@ -53,12 +54,13 @@ async def on_message(message): funcs.logThis(message.author.name+" ran \""+message.content+"\"") await message.channel.send("Logging out...") - with open("resources/games.json","r") as f: + with open("resources/games/games.json","r") as f: data = json.load(f) data["trivia questions"] = {} + data["blackjack games"] = {} - with open("resources/games.json","w") as f: + with open("resources/games/games.json","w") as f: json.dump(data,f,indent=4) await client.logout() @@ -254,11 +256,11 @@ async def on_message(message): funcs.triviaCountPoints(str(message.channel)) - with open("resources/games.json", "r") as f: + with open("resources/games/games.json", "r") as f: data = json.load(f) del data["trivia questions"][str(message.channel)] - with open("resources/games.json", "w") as f: + with open("resources/games/games.json", "w") as f: json.dump(data,f,indent=4) funcs.logThis("Time's up for the trivia question in "+str(message.channel)) @@ -282,7 +284,11 @@ async def on_message(message): elif message.content.lower().startswith("!balance"): funcs.logThis(message.author.name+" ran \""+message.content+"\"") response = funcs.checkBalance(message.author.name.lower()) - await message.channel.send(message.author.name + " has " + str(response) + " GwendoBucks") + if response == 1: + new_message = message.author.name + " has " + str(response) + " GwendoBuck" + else: + new_message = message.author.name + " has " + str(response) + " GwendoBucks" + await message.channel.send(new_message) #gives money to other player elif message.content.lower().startswith("!give "): @@ -300,6 +306,75 @@ async def on_message(message): funcs.logThis("I didn't understand that") await message.channel.send("I didn't understand that") + elif message.content.lower().startswith("!blackjack"): + funcs.logThis(message.author.name+" ran \""+message.content+"\"") + if message.content.lower() == "!blackjack" or message.content.lower() == "!blackjack ": + new_message = funcs.blackjackStart(str(message.channel)) + if new_message == "started": + cardsLeft = 0 + with open("resources/games/blackjackCards.txt","r") as f: + for line in f: + cardsLeft += 1 + + if cardsLeft < 50: + funcs.shuffle() + await message.channel.send("Shuffling the deck...") + + new_message = "Blackjack game started. Use \"!blackjack bet [amount]\" to enter the game within the next 30 seconds." + await message.channel.send(new_message) + await message.channel.send(file = discord.File("resources/games/tables/blackjackTable"+str(message.channel)+".png")) + + await asyncio.sleep(30) + + gamedone = False + + with open("resources/games/games.json", "r") as f: + data = json.load(f) + if len(data["blackjack games"][str(message.channel)]["user hands"]) == 0: + gamedone = True + await message.channel.send("No one entered the game. Ending the game.") + + while gamedone == False: + new_message, allStanding, gamedone = funcs.blackjackContinue(str(message.channel)) + await message.channel.send(new_message) + if gamedone == False: + await message.channel.send(file = discord.File("resources/games/tables/blackjackTable"+str(message.channel)+".png")) + if allStanding: + await asyncio.sleep(5) + else: + await asyncio.sleep(20) + + new_message = funcs.blackjackFinish(str(message.channel)) + await message.channel.send(new_message) + + + + else: + await message.channel.send(new_message) + if message.content.lower().startswith("!blackjack bet"): + commands = message.content.lower().split(" ") + try: + amount = int(commands[2]) + response = funcs.blackjackPlayerDrawHand(str(message.channel),message.author.name,amount) + except: + funcs.logThis("I didn't understand that") + response = "I didn't understand that" + await message.channel.send(response) + + if message.content.lower().startswith("!blackjack hit"): + response = funcs.blackjackHit(str(message.channel),message.author.name) + if response == "accept": + await message.add_reaction("👍") + else: + await message.channel.send(response) + + if message.content.lower().startswith("!blackjack stand"): + response = funcs.blackjackStand(str(message.channel),message.author.name) + if response == "accept": + await message.add_reaction("👍") + else: + await message.channel.send(response) + # Is a bit sassy sometimes meanWords = ["stupid", "bitch", "fuck", "dumb", "idiot"] diff --git a/funcs/__init__.py b/funcs/__init__.py index 34a195c..eb1c763 100644 --- a/funcs/__init__.py +++ b/funcs/__init__.py @@ -1,4 +1,4 @@ -from .gwendolynFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles +from .gwendolynFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, replaceMultiple from .swfuncs import parseChar, parseRoll, parseDestiny, critRoll @@ -6,6 +6,6 @@ from .lookup import spellFunc, monsterFunc from .other import nameGen, tavernGen, movieFunc -from .games import triviaStart, triviaOtherThing, triviaCountPoints, checkBalance, giveMoney +from .games import triviaStart, triviaOtherThing, triviaCountPoints, checkBalance, addMoney, giveMoney, shuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackStand, blackjackHit from .roll import roll_dice \ No newline at end of file diff --git a/funcs/games/__init__.py b/funcs/games/__init__.py index f4d3ef3..582ba06 100644 --- a/funcs/games/__init__.py +++ b/funcs/games/__init__.py @@ -1,2 +1,3 @@ -from .money import checkBalance, giveMoney -from .trivia import triviaCountPoints, triviaStart, triviaOtherThing \ No newline at end of file +from .money import checkBalance, giveMoney, addMoney +from .trivia import triviaCountPoints, triviaStart, triviaOtherThing +from .blackjack import shuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand \ No newline at end of file diff --git a/funcs/games/blackjack.py b/funcs/games/blackjack.py new file mode 100644 index 0000000..c1c0627 --- /dev/null +++ b/funcs/games/blackjack.py @@ -0,0 +1,301 @@ +import random +import json +import math + +from shutil import copyfile + +from funcs import logThis, replaceMultiple +from . import money, blackjackDraw + +deckAmount = 4 + +def shuffle(): + logThis("Shuffling the blackjack deck") + + with open("resources/games/deckofCards.txt","r") as f: + deck = f.read() + + allDecks = deck.split("\n") * 4 + random.shuffle(allDecks) + data = "\n".join(allDecks) + + with open("resources/games/blackjackCards.txt","w") as f: + f.write(data) + + return + +def calcHandValue(hand : list): + logThis("Calculating hand value") + values = [0] + + for card in hand: + cardValue = card[0] + cardValue = replaceMultiple(cardValue,["0","k","q","j"],"10") + if cardValue == "a": + length = len(values) + for x in range(length): + values.append(values[x] + 11) + values[x] += 1 + else: + for x in range(len(values)): + values[x] += int(cardValue) + + values.sort() + + handValue = values[0] + for value in values: + if value <= 21: + handValue = value + + return handValue + +def drawCard(): + logThis("drawing a card") + with open("resources/games/blackjackCards.txt","r") as f: + cards = f.read().split("\n") + + drawnCard = cards[0] + cards = cards[1:] + data = "\n".join(cards) + + with open("resources/games/blackjackCards.txt","w") as f: + f.write(data) + + return drawnCard + +def dealerDraw(channel): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + done = False + + if calcHandValue(data["blackjack games"][channel]["dealer hand"]) < 17: + data["blackjack games"][channel]["dealer hand"].append(drawCard()) + else: + done = True + + if calcHandValue(data["blackjack games"][channel]["dealer hand"]) > 21: + data["blackjack games"][channel]["dealer busted"] = True + + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + return done + +def blackjackContinue(channel): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + done = False + + if data["blackjack games"][channel]["open for bets"]: + data["blackjack games"][channel]["open for bets"] = False + + + allStanding = True + message = "All players are standing. The dealer now shows his cards and draws." + + if data["blackjack games"][channel]["all standing"]: + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + done = dealerDraw(channel) + message = "The dealer draws a card." + + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + for user in data["blackjack games"][channel]["user hands"]: + if data["blackjack games"][channel]["user hands"][user]["hit"] == False: + data["blackjack games"][channel]["user hands"][user]["standing"] = True + + if data["blackjack games"][channel]["user hands"][user]["standing"] == False: + allStanding = False + data["blackjack games"][channel]["user hands"][user]["hit"] = False + + if allStanding: + data["blackjack games"][channel]["all standing"] = True + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + else: + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + blackjackDraw.drawImage(channel) + + if allStanding: + if done == False: + return message, True, done + else: + return "The dealer is done drawing cards", True, done + else: + return "You have 20 seconds to either hit or stand with \"!blackjack hit\" or \"!blackjack stand\". It's assumed you're standing if you don't make a choice.", False, done + +def blackjackHit(channel,user): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + if data["blackjack games"][channel]["open for bets"] == False: + if data["blackjack games"][channel]["user hands"][user]["hit"] == False: + if data["blackjack games"][channel]["user hands"][user]["standing"] == False: + data["blackjack games"][channel]["user hands"][user]["hand"].append(drawCard()) + data["blackjack games"][channel]["user hands"][user]["hit"] = True + + handValue = calcHandValue(data["blackjack games"][channel]["user hands"][user]["hand"]) + + if handValue == 21: + data["blackjack games"][channel]["user hands"][user]["standing"] = True + elif handValue > 21: + data["blackjack games"][channel]["user hands"][user]["standing"] = True + data["blackjack games"][channel]["user hands"][user]["busted"] = True + + + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + return "accept" + else: + logThis(user+" is already standing") + return "You can't hit when you're standing" + else: + logThis(user+" has already hit this round") + return "You've already hit this round" + else: + logThis(user+" tried to hit on the first round") + return "You can't hit before you see your cards" + +def blackjackStand(channel,user): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + if data["blackjack games"][channel]["open for bets"] == False: + if data["blackjack games"][channel]["user hands"][user]["hit"] == False: + if data["blackjack games"][channel]["user hands"][user]["standing"] == False: + data["blackjack games"][channel]["user hands"][user]["standing"] = True + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + return "accept" + else: + logThis(user+" is already standing") + return "You're already standing" + else: + logThis(user+" has already hit this round") + return "You've already hit this round" + else: + logThis(user+" tried to stand on the first round") + return "You can't stand before you see your cards" + +def blackjackPlayerDrawHand(channel,user,bet): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + logThis(user+" is trying to join the game in "+channel) + + if channel in data["blackjack games"]: + if user not in data["blackjack games"][channel]["user hands"]: + if len(data["blackjack games"][channel]["user hands"]) < 5: + if data["blackjack games"][channel]["open for bets"]: + if money.checkBalance(user) >= bet: + money.addMoney(user,-1 * bet) + playerHand = [drawCard(),drawCard()] + + handValue = calcHandValue(playerHand) + + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + if handValue == 21: + data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,"bet":bet,"standing":True,"busted":False,"blackjack":True,"hit":True} + else: + data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,"bet":bet,"standing":False,"busted":False,"blackjack":False,"hit":True} + + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + logThis(user+" entered the game") + return user+" entered the game" + else: + logThis(user+" doesn't have enough GwendoBucks") + return "You don't have enough GwendoBucks to place that bet" + else: + logThis("The table is no longer open for bets") + return "The table is no longer open for bets" + else: + logThis("There are already 5 players in the game.") + return "There's already a maximum of players at the table." + else: + logThis(user+" is already in the game") + return "You've already entered this game" + else: + logThis("There is no game going on in "+channel) + return "There is no game going on in this channel" + +def blackjackStart(channel:str): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + logThis("Trying to start a blackjack game in "+channel) + + if channel not in data["blackjack games"]: + + dealerHand = [drawCard(),drawCard()] + + data["blackjack games"][channel] = {"dealer hand": dealerHand,"dealer busted":False,"user hands": {},"open for bets":True,"all standing":False} + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + copyfile("resources/games/blackjackTable.png","resources/games/tables/blackjackTable"+channel+".png") + + return "started" + else: + logThis("There is already a blackjack game going on in "+channel) + return "There's already a blackjack game going on. Try again in a few minutes." + +def blackjackFinish(channel): + finalWinnings = "*Final Winnings:*\n" + + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + dealerValue = calcHandValue(data["blackjack games"][channel]["dealer hand"]) + reason = "" + + for user in data["blackjack games"][channel]["user hands"]: + winnings = -1 * data["blackjack games"][channel]["user hands"][user]["bet"] + if data["blackjack games"][channel]["user hands"][user]["blackjack"]: + reason = "(blackjack)" + winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["bet"]) + else: + if data["blackjack games"][channel]["user hands"][user]["busted"] == False: + if data["blackjack games"][channel]["dealer busted"]: + reason = "(dealer busted)" + winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"] + elif calcHandValue(data["blackjack games"][channel]["user hands"][user]["hand"]) > dealerValue: + winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"] + else: + reason = "(busted)" + + if winnings < 0: + if winnings == -1: + finalWinnings += user+" lost "+str(-1 * winnings)+" GwendoBuck "+reason+"\n" + else: + finalWinnings += user+" lost "+str(-1 * winnings)+" GwendoBucks "+reason+"\n" + else: + if winnings == 1: + finalWinnings += user+" won "+str(winnings)+" GwendoBuck "+reason+"\n" + else: + finalWinnings += user+" won "+str(winnings)+" GwendoBucks "+reason+"\n" + + netWinnings = winnings + data["blackjack games"][channel]["user hands"][user]["bet"] + + money.addMoney(user,netWinnings) + + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + del data["blackjack games"][channel] + + with open("resources/games/games.json", "w") as f: + json.dump(data,f,indent=4) + + return finalWinnings diff --git a/funcs/games/blackjackDraw.py b/funcs/games/blackjackDraw.py new file mode 100644 index 0000000..67f47f0 --- /dev/null +++ b/funcs/games/blackjackDraw.py @@ -0,0 +1,41 @@ +import json + +from PIL import Image + +def drawImage(channel): + with open("resources/games/games.json", "r") as f: + data = json.load(f) + + if data["blackjack games"][channel]["all standing"] == False: + dealerHand = drawHand(data["blackjack games"][channel]["dealer hand"],True) + else: + dealerHand = drawHand(data["blackjack games"][channel]["dealer hand"],False) + + table = Image.open("resources/games/blackjackTable.png") + table.paste(dealerHand,(800,20),dealerHand) + + for x in range(len(data["blackjack games"][channel]["user hands"])): + userHand = drawHand(list(data["blackjack games"][channel]["user hands"].values())[x]["hand"],False) + table.paste(userHand,(32+(384*x),700),userHand) + + table.save("resources/games/tables/blackjackTable"+channel+".png") + + return + +def drawHand(hand, dealer): + length = len(hand) + background = Image.new("RGBA", (691+(125*(length-1)),1065),(0,0,0,0)) + + if dealer: + img = Image.open("resources/games/cards/"+hand[0].upper()+".png") + background.paste(img,(0,0),img) + img = Image.open("resources/games/cards/red_back.png") + background.paste(img,(125,0),img) + else: + for x in range(length): + img = Image.open("resources/games/cards/"+hand[x].upper()+".png") + background.paste(img,(x*125,0),img) + + w, h = background.size + + return background.resize((int(w/4),int(h/4))) diff --git a/funcs/games/money.py b/funcs/games/money.py index 0db9aef..39e9971 100644 --- a/funcs/games/money.py +++ b/funcs/games/money.py @@ -3,7 +3,9 @@ import json from funcs import logThis def checkBalance(user): - with open("resources/games.json", "r") as f: + user = user.lower() + logThis("checking "+user+"'s account balance") + with open("resources/games/games.json", "r") as f: data = json.load(f) if user in data["users"]: @@ -11,7 +13,9 @@ def checkBalance(user): else: return 0 def addMoney(user,amount): - with open("resources/games.json", "r") as f: + user = user.lower() + logThis("adding "+str(amount)+" to "+user+"'s account") + with open("resources/games/games.json", "r") as f: data = json.load(f) if user in data["users"]: @@ -20,11 +24,11 @@ def addMoney(user,amount): else: data["users"][user] = amount - with open("resources/games.json", "w") as f: + with open("resources/games/games.json", "w") as f: json.dump(data,f,indent=4) def giveMoney(user,targetUser,amount): - with open("resources/games.json", "r") as f: + with open("resources/games/games.json", "r") as f: data = json.load(f) if user in data["users"]: diff --git a/funcs/games/trivia.py b/funcs/games/trivia.py index ebaa0d2..5f6240b 100644 --- a/funcs/games/trivia.py +++ b/funcs/games/trivia.py @@ -6,8 +6,8 @@ from . import money from funcs import logThis def triviaStart(channel : str): - with open("resources/games.json", "r") as f: - triviaFile = json.load(f) + with open("resources/games/games.json", "r") as f: + triviaFile = json.load(f) logThis("Trying to find a trivia question for "+channel) @@ -22,7 +22,7 @@ def triviaStart(channel : str): correctAnswer = answers.index(data["results"][0]["correct_answer"]) + 97 triviaFile["trivia questions"][channel] = {"answer" : str(chr(correctAnswer)),"players" : {}} - with open("resources/games.json", "w") as f: + with open("resources/games/games.json", "w") as f: json.dump(triviaFile,f,indent=4) replacements = {"'": "\'", @@ -45,7 +45,7 @@ def triviaStart(channel : str): return "There's already a trivia question going on. Try again in like, a minute", "", "" def triviaOtherThing(user : str, channel : str, command : str): - with open("resources/games.json", "r") as f: + with open("resources/games/games.json", "r") as f: data = json.load(f) if command in ["a","b","c","d"]: @@ -55,7 +55,7 @@ def triviaOtherThing(user : str, channel : str, command : str): data["trivia questions"][channel]["players"][user] = command - with open("resources/games.json", "w") as f: + with open("resources/games/games.json", "w") as f: json.dump(data,f,indent=4) return "Locked in "+user+"'s answer" @@ -67,7 +67,7 @@ def triviaOtherThing(user : str, channel : str, command : str): return "I didn't quite understand that" def triviaCountPoints(channel : str): - with open("resources/games.json", "r") as f: + with open("resources/games/games.json", "r") as f: data = json.load(f) logThis("Counting points for question in "+channel) diff --git a/funcs/gwendolynFuncs.py b/funcs/gwendolynFuncs.py index d95a2bc..24a5e5e 100644 --- a/funcs/gwendolynFuncs.py +++ b/funcs/gwendolynFuncs.py @@ -8,6 +8,7 @@ import imdb # Used by movieFunc import time # Used for logging import logging # Used for... you know... logging import wikia # Used by findWikiPage +import os from .roll import dice @@ -139,14 +140,26 @@ def makeFiles(): # Creates games.json if it doesn't exist try: - f = open("resources/games.json","r") + f = open("resources/games/games.json","r") except: logThis("games.json didn't exist. Making it now.") - data = {"trivia questions":{},"users":{}} - with open("resources/games.json","w") as f: + data = {"trivia questions":{},"blackjack games":{},"users":{}} + with open("resources/games/games.json","w") as f: json.dump(data,f,indent = 4) finally: f.close() + + + # Creates blackjackCards.txt if it doesn't exist + try: + f = open("resources/games/blackjackCards.txt","r") + except: + logThis("blackjackCards.txt didn't exist. Making it now.") + data = "" + with open("resources/games/blackjackCards.txt","w") as f: + f.write(data) + finally: + f.close() # Creates destinyPoints.txt if it doesn't exist try: @@ -168,4 +181,21 @@ def makeFiles(): f.write(token) finally: - f.close() \ No newline at end of file + f.close() + + try: + os.makedirs("resources/games/tables") + logThis("The tables directory didn't exist") + except: + logThis("The tables directory existed") + +def replaceMultiple(mainString, toBeReplaces, newString): + # Iterate over the strings to be replaced + for elem in toBeReplaces : + # Check if string is in the main string + if elem in mainString : + # Replace the string + mainString = mainString.replace(elem, newString) + + return mainString + diff --git a/resources/games/blackjackTable.png b/resources/games/blackjackTable.png new file mode 100644 index 0000000..639d860 Binary files /dev/null and b/resources/games/blackjackTable.png differ diff --git a/resources/games/cards/0C.png b/resources/games/cards/0C.png new file mode 100644 index 0000000..f9ade6d Binary files /dev/null and b/resources/games/cards/0C.png differ diff --git a/resources/games/cards/0D.png b/resources/games/cards/0D.png new file mode 100644 index 0000000..a9de67e Binary files /dev/null and b/resources/games/cards/0D.png differ diff --git a/resources/games/cards/0H.png b/resources/games/cards/0H.png new file mode 100644 index 0000000..df551b0 Binary files /dev/null and b/resources/games/cards/0H.png differ diff --git a/resources/games/cards/0S.png b/resources/games/cards/0S.png new file mode 100644 index 0000000..22141df Binary files /dev/null and b/resources/games/cards/0S.png differ diff --git a/resources/games/cards/2C.png b/resources/games/cards/2C.png new file mode 100644 index 0000000..413b0da Binary files /dev/null and b/resources/games/cards/2C.png differ diff --git a/resources/games/cards/2D.png b/resources/games/cards/2D.png new file mode 100644 index 0000000..f966e48 Binary files /dev/null and b/resources/games/cards/2D.png differ diff --git a/resources/games/cards/2H.png b/resources/games/cards/2H.png new file mode 100644 index 0000000..345744e Binary files /dev/null and b/resources/games/cards/2H.png differ diff --git a/resources/games/cards/2S.png b/resources/games/cards/2S.png new file mode 100644 index 0000000..a0de145 Binary files /dev/null and b/resources/games/cards/2S.png differ diff --git a/resources/games/cards/3C.png b/resources/games/cards/3C.png new file mode 100644 index 0000000..f8b8183 Binary files /dev/null and b/resources/games/cards/3C.png differ diff --git a/resources/games/cards/3D.png b/resources/games/cards/3D.png new file mode 100644 index 0000000..cee21f3 Binary files /dev/null and b/resources/games/cards/3D.png differ diff --git a/resources/games/cards/3H.png b/resources/games/cards/3H.png new file mode 100644 index 0000000..8494e1c Binary files /dev/null and b/resources/games/cards/3H.png differ diff --git a/resources/games/cards/3S.png b/resources/games/cards/3S.png new file mode 100644 index 0000000..78e3b20 Binary files /dev/null and b/resources/games/cards/3S.png differ diff --git a/resources/games/cards/4C.png b/resources/games/cards/4C.png new file mode 100644 index 0000000..8938459 Binary files /dev/null and b/resources/games/cards/4C.png differ diff --git a/resources/games/cards/4D.png b/resources/games/cards/4D.png new file mode 100644 index 0000000..d9ae5be Binary files /dev/null and b/resources/games/cards/4D.png differ diff --git a/resources/games/cards/4H.png b/resources/games/cards/4H.png new file mode 100644 index 0000000..41a4488 Binary files /dev/null and b/resources/games/cards/4H.png differ diff --git a/resources/games/cards/4S.png b/resources/games/cards/4S.png new file mode 100644 index 0000000..70bc9cc Binary files /dev/null and b/resources/games/cards/4S.png differ diff --git a/resources/games/cards/5C.png b/resources/games/cards/5C.png new file mode 100644 index 0000000..a7f49be Binary files /dev/null and b/resources/games/cards/5C.png differ diff --git a/resources/games/cards/5D.png b/resources/games/cards/5D.png new file mode 100644 index 0000000..cff0617 Binary files /dev/null and b/resources/games/cards/5D.png differ diff --git a/resources/games/cards/5H.png b/resources/games/cards/5H.png new file mode 100644 index 0000000..1efcbf3 Binary files /dev/null and b/resources/games/cards/5H.png differ diff --git a/resources/games/cards/5S.png b/resources/games/cards/5S.png new file mode 100644 index 0000000..e708806 Binary files /dev/null and b/resources/games/cards/5S.png differ diff --git a/resources/games/cards/6C.png b/resources/games/cards/6C.png new file mode 100644 index 0000000..d8382d3 Binary files /dev/null and b/resources/games/cards/6C.png differ diff --git a/resources/games/cards/6D.png b/resources/games/cards/6D.png new file mode 100644 index 0000000..7ba40e9 Binary files /dev/null and b/resources/games/cards/6D.png differ diff --git a/resources/games/cards/6H.png b/resources/games/cards/6H.png new file mode 100644 index 0000000..93a84f8 Binary files /dev/null and b/resources/games/cards/6H.png differ diff --git a/resources/games/cards/6S.png b/resources/games/cards/6S.png new file mode 100644 index 0000000..874162b Binary files /dev/null and b/resources/games/cards/6S.png differ diff --git a/resources/games/cards/7C.png b/resources/games/cards/7C.png new file mode 100644 index 0000000..f6a9653 Binary files /dev/null and b/resources/games/cards/7C.png differ diff --git a/resources/games/cards/7D.png b/resources/games/cards/7D.png new file mode 100644 index 0000000..6c4393d Binary files /dev/null and b/resources/games/cards/7D.png differ diff --git a/resources/games/cards/7H.png b/resources/games/cards/7H.png new file mode 100644 index 0000000..d4a59ff Binary files /dev/null and b/resources/games/cards/7H.png differ diff --git a/resources/games/cards/7S.png b/resources/games/cards/7S.png new file mode 100644 index 0000000..895f85c Binary files /dev/null and b/resources/games/cards/7S.png differ diff --git a/resources/games/cards/8C.png b/resources/games/cards/8C.png new file mode 100644 index 0000000..bc87bf0 Binary files /dev/null and b/resources/games/cards/8C.png differ diff --git a/resources/games/cards/8D.png b/resources/games/cards/8D.png new file mode 100644 index 0000000..38c5695 Binary files /dev/null and b/resources/games/cards/8D.png differ diff --git a/resources/games/cards/8H.png b/resources/games/cards/8H.png new file mode 100644 index 0000000..c2812aa Binary files /dev/null and b/resources/games/cards/8H.png differ diff --git a/resources/games/cards/8S.png b/resources/games/cards/8S.png new file mode 100644 index 0000000..0277cc6 Binary files /dev/null and b/resources/games/cards/8S.png differ diff --git a/resources/games/cards/9C.png b/resources/games/cards/9C.png new file mode 100644 index 0000000..d81b2f2 Binary files /dev/null and b/resources/games/cards/9C.png differ diff --git a/resources/games/cards/9D.png b/resources/games/cards/9D.png new file mode 100644 index 0000000..e0d3d05 Binary files /dev/null and b/resources/games/cards/9D.png differ diff --git a/resources/games/cards/9H.png b/resources/games/cards/9H.png new file mode 100644 index 0000000..7b679e1 Binary files /dev/null and b/resources/games/cards/9H.png differ diff --git a/resources/games/cards/9S.png b/resources/games/cards/9S.png new file mode 100644 index 0000000..f58493e Binary files /dev/null and b/resources/games/cards/9S.png differ diff --git a/resources/games/cards/AC.png b/resources/games/cards/AC.png new file mode 100644 index 0000000..396c158 Binary files /dev/null and b/resources/games/cards/AC.png differ diff --git a/resources/games/cards/AD.png b/resources/games/cards/AD.png new file mode 100644 index 0000000..d702a39 Binary files /dev/null and b/resources/games/cards/AD.png differ diff --git a/resources/games/cards/AH.png b/resources/games/cards/AH.png new file mode 100644 index 0000000..435fc14 Binary files /dev/null and b/resources/games/cards/AH.png differ diff --git a/resources/games/cards/AS.png b/resources/games/cards/AS.png new file mode 100644 index 0000000..f07f67d Binary files /dev/null and b/resources/games/cards/AS.png differ diff --git a/resources/games/cards/JC.png b/resources/games/cards/JC.png new file mode 100644 index 0000000..16418e4 Binary files /dev/null and b/resources/games/cards/JC.png differ diff --git a/resources/games/cards/JD.png b/resources/games/cards/JD.png new file mode 100644 index 0000000..05b0389 Binary files /dev/null and b/resources/games/cards/JD.png differ diff --git a/resources/games/cards/JH.png b/resources/games/cards/JH.png new file mode 100644 index 0000000..259421c Binary files /dev/null and b/resources/games/cards/JH.png differ diff --git a/resources/games/cards/JS.png b/resources/games/cards/JS.png new file mode 100644 index 0000000..6e0554d Binary files /dev/null and b/resources/games/cards/JS.png differ diff --git a/resources/games/cards/KC.png b/resources/games/cards/KC.png new file mode 100644 index 0000000..70c4ee5 Binary files /dev/null and b/resources/games/cards/KC.png differ diff --git a/resources/games/cards/KD.png b/resources/games/cards/KD.png new file mode 100644 index 0000000..95a3b8f Binary files /dev/null and b/resources/games/cards/KD.png differ diff --git a/resources/games/cards/KH.png b/resources/games/cards/KH.png new file mode 100644 index 0000000..0defcbb Binary files /dev/null and b/resources/games/cards/KH.png differ diff --git a/resources/games/cards/KS.png b/resources/games/cards/KS.png new file mode 100644 index 0000000..43b8e19 Binary files /dev/null and b/resources/games/cards/KS.png differ diff --git a/resources/games/cards/QC.png b/resources/games/cards/QC.png new file mode 100644 index 0000000..6f74177 Binary files /dev/null and b/resources/games/cards/QC.png differ diff --git a/resources/games/cards/QD.png b/resources/games/cards/QD.png new file mode 100644 index 0000000..85c443f Binary files /dev/null and b/resources/games/cards/QD.png differ diff --git a/resources/games/cards/QH.png b/resources/games/cards/QH.png new file mode 100644 index 0000000..ba8e1e4 Binary files /dev/null and b/resources/games/cards/QH.png differ diff --git a/resources/games/cards/QS.png b/resources/games/cards/QS.png new file mode 100644 index 0000000..a6ef69f Binary files /dev/null and b/resources/games/cards/QS.png differ diff --git a/resources/games/cards/blue_back.png b/resources/games/cards/blue_back.png new file mode 100644 index 0000000..24fcfb7 Binary files /dev/null and b/resources/games/cards/blue_back.png differ diff --git a/resources/games/cards/gray_back.png b/resources/games/cards/gray_back.png new file mode 100644 index 0000000..0b40ae3 Binary files /dev/null and b/resources/games/cards/gray_back.png differ diff --git a/resources/games/cards/green_back.png b/resources/games/cards/green_back.png new file mode 100644 index 0000000..79b7d8c Binary files /dev/null and b/resources/games/cards/green_back.png differ diff --git a/resources/games/cards/purple_back.png b/resources/games/cards/purple_back.png new file mode 100644 index 0000000..ac96728 Binary files /dev/null and b/resources/games/cards/purple_back.png differ diff --git a/resources/games/cards/red_back.png b/resources/games/cards/red_back.png new file mode 100644 index 0000000..759383d Binary files /dev/null and b/resources/games/cards/red_back.png differ diff --git a/resources/games/cards/yellow_back.png b/resources/games/cards/yellow_back.png new file mode 100644 index 0000000..11d29c9 Binary files /dev/null and b/resources/games/cards/yellow_back.png differ diff --git a/resources/games/deckofCards.txt b/resources/games/deckofCards.txt new file mode 100644 index 0000000..a3beeb4 --- /dev/null +++ b/resources/games/deckofCards.txt @@ -0,0 +1,52 @@ +ad +2d +3d +4d +5d +6d +7d +8d +9d +0d +jd +qd +kd +ac +2c +3c +4c +5c +6c +7c +8c +9c +0c +jc +qc +kc +ah +2h +3h +4h +5h +6h +7h +8h +9h +0h +jh +qh +kh +as +2s +3s +4s +5s +6s +7s +8s +9s +0s +js +qs +ks \ No newline at end of file