Moved shit to recycle bin etc etc
This commit is contained in:
95
Recycle Bin/BlackJackBot/BJBot.py
Normal file
95
Recycle Bin/BlackJackBot/BJBot.py
Normal file
@@ -0,0 +1,95 @@
|
||||
import discord
|
||||
|
||||
from BlackJack import *
|
||||
|
||||
client = commands.Bot(command_prefix='~~')
|
||||
|
||||
async def discordInput(interaction: discord.Interaction, message:str):
|
||||
await interaction.response.send_message(message)
|
||||
def check(m):
|
||||
return m.content in ["h", "s"] and m.channel == interaction.channel
|
||||
msg = await client.wait_for('message', check=check)
|
||||
|
||||
async def discordOutput(ctx, message):
|
||||
await ctx.send(message)
|
||||
|
||||
@client.event
|
||||
async def on_ready():
|
||||
print("Let's pwn some scrubs")
|
||||
|
||||
@client.command()
|
||||
async def play_game(ctx, arg):
|
||||
await ctx.send("Players hand = " + str(getHandTotal(bj.playerHand)) + ": " + handNumbersToCards(
|
||||
bj.playerHand) + "\n" + "Dealers hand = ??: " + convertNumberToCard(bj.dealerHand[0]) + "??")
|
||||
bj = BlackJack()
|
||||
gameOver = False
|
||||
playerStood = False
|
||||
ID = ctx.message.author.id
|
||||
IDFound = bj.findID(ID)[0]
|
||||
if IDFound:
|
||||
playerStats = bj.readLedger(ID)[1:]
|
||||
playerStats[0] = ID
|
||||
else:
|
||||
bj.addToLedger(ID)
|
||||
playerStats = (ID, 100, 0, 0)
|
||||
while not gameOver:
|
||||
playerWinState = bj.checkHandState(bj.playerHand)
|
||||
dealerWinState = bj.checkHandState(bj.dealerHand)
|
||||
gameOver = bj.checkGameOver(playerWinState)
|
||||
if gameOver:
|
||||
continue
|
||||
gameOver = bj.checkGameOver(dealerWinState)
|
||||
if gameOver:
|
||||
continue
|
||||
|
||||
|
||||
await ctx.send("Hit or Stand? (h/s)")
|
||||
|
||||
def check(m):
|
||||
return m.content in ["h", "s"] and m.channel == ctx.channel
|
||||
|
||||
msg = await client.wait_for('message', check=check)
|
||||
if msg == "h":
|
||||
bj.hit()
|
||||
elif msg == "s":
|
||||
bj.stand()
|
||||
playerStood = True
|
||||
|
||||
|
||||
playerWinState = bj.checkHandState(bj.playerHand)
|
||||
gameOver = bj.checkGameOver(playerWinState)
|
||||
if gameOver:
|
||||
continue
|
||||
# Dealers turn
|
||||
if playerStood:
|
||||
while dealerWinState == 'c':
|
||||
# Dealer hits
|
||||
bj.hit()
|
||||
# Player stands
|
||||
bj.stand()
|
||||
# Loop ends when game is over
|
||||
dealerWinState = bj.checkHandState(bj.dealerHand)
|
||||
else:
|
||||
bj.hit()
|
||||
dealerWinState = bj.checkHandState(bj.dealerHand)
|
||||
|
||||
gameOver = bj.checkGameOver(dealerWinState)
|
||||
if gameOver:
|
||||
continue
|
||||
await ctx.send("Players hand = " + str(getHandTotal(bj.playerHand)) + ": " + handNumbersToCards(bj.playerHand) +
|
||||
"\n" + "Dealers hand = " + str(getHandTotal(bj.dealerHand)) + ": " + handNumbersToCards(bj.dealerHand))
|
||||
bet = int(arg)
|
||||
if playerWinState == "w":
|
||||
await ctx.send("You won!")
|
||||
bj.writeLedger(ID, 2*bet, True)
|
||||
elif playerWinState == "l":
|
||||
await ctx.send("You busted!")
|
||||
bj.writeLedger(ID, -bet, False)
|
||||
elif dealerWinState == "w":
|
||||
await ctx.send("The Dealer reached 21 before you!")
|
||||
bj.writeLedger(ID, -bet, False)
|
||||
elif dealerWinState == "l":
|
||||
await ctx.send("The Dealer busted before you!")
|
||||
bj.writeLedger(ID, 2*bet, True)
|
||||
|
||||
client.run('ODU0MjE5MDMzNzc0NTIyMzY4.YMgveA.laeIhhccTDvEbU81Y-RjSEMkaEY')
|
||||
258
Recycle Bin/BlackJackBot/BlackJackOld.py
Normal file
258
Recycle Bin/BlackJackBot/BlackJackOld.py
Normal file
@@ -0,0 +1,258 @@
|
||||
import random
|
||||
import Ledger
|
||||
|
||||
# Game States
|
||||
INIT = 0
|
||||
PLAYING = 1
|
||||
ENDING = 2
|
||||
FINISHED = 3
|
||||
OVER = 5
|
||||
CHECKING = 6
|
||||
|
||||
|
||||
|
||||
def convertNumberToCard(cardNumber):
|
||||
# Cards index from 0 i.e ace is 0, and the highest card value is 51
|
||||
if cardNumber <= 12:
|
||||
cardSuit = "♣"
|
||||
elif cardNumber <= 25:
|
||||
cardSuit = "♦"
|
||||
elif cardNumber <= 38:
|
||||
cardSuit = "♥"
|
||||
elif cardNumber <= 51:
|
||||
cardSuit = "♠"
|
||||
|
||||
cardNumber = cardNumber % 13
|
||||
|
||||
if cardNumber == 0:
|
||||
cardNumber = "A"
|
||||
elif cardNumber == 10:
|
||||
cardNumber = "J"
|
||||
elif cardNumber == 11:
|
||||
cardNumber = "Q"
|
||||
elif cardNumber == 12:
|
||||
cardNumber = "K"
|
||||
else:
|
||||
cardNumber += 1
|
||||
|
||||
return "{value}{suit} ".format(value=str(cardNumber), suit=cardSuit)
|
||||
|
||||
def generateDeck():
|
||||
return [x for x in range(0, 51)]
|
||||
|
||||
def addCardToHand(hand, deck):
|
||||
card = deck.pop(0)
|
||||
hand.append(card)
|
||||
|
||||
def generateHand(hand, deck, handSize = 2):
|
||||
i = 0
|
||||
while i < handSize:
|
||||
addCardToHand(hand, deck)
|
||||
i += 1
|
||||
|
||||
def handNumbersToCards(hand):
|
||||
cards = ""
|
||||
for card in hand:
|
||||
cards += convertNumberToCard(card)
|
||||
return cards
|
||||
|
||||
def getHandTotal(hand):
|
||||
cardValue = lambda c: min(c % 13 + 1, 10)
|
||||
i = 0
|
||||
aces = 0
|
||||
for card in hand:
|
||||
card = cardValue(card)
|
||||
if card == 1:
|
||||
aces += 1
|
||||
else:
|
||||
i += card
|
||||
|
||||
while aces > 0:
|
||||
if i < 20:
|
||||
card = 11
|
||||
if (i + card) > 21:
|
||||
card = 1
|
||||
i += card
|
||||
aces -= 1
|
||||
return i
|
||||
|
||||
def showDeck(deck):
|
||||
string = ""
|
||||
for card in deck:
|
||||
string += convertNumberToCard(card)
|
||||
return string
|
||||
|
||||
class BlackJack:
|
||||
def __init__(self):
|
||||
self.gameInSession = False
|
||||
self.playerTurn = True
|
||||
self.deck = generateDeck()
|
||||
random.shuffle(self.deck)
|
||||
self.discard = []
|
||||
self.playerHand = []
|
||||
self.dealerHand = []
|
||||
self.ledger = Ledger.Ledger()
|
||||
|
||||
def returnCards(self):
|
||||
self.discard.extend(self.playerHand)
|
||||
self.playerHand.clear()
|
||||
self.discard.extend(self.dealerHand)
|
||||
self.dealerHand.clear()
|
||||
|
||||
def deal(self):
|
||||
generateHand(self.playerHand, self.deck)
|
||||
generateHand(self.dealerHand, self.deck)
|
||||
|
||||
def shuffle(self):
|
||||
self.deck.extend(self.discard)
|
||||
self.discard.clear()
|
||||
random.shuffle(self.deck)
|
||||
|
||||
def stand(self):
|
||||
if self.playerTurn:
|
||||
self.playerTurn = False
|
||||
|
||||
def hit(self):
|
||||
if self.playerTurn:
|
||||
addCardToHand(self.playerHand, self.deck)
|
||||
self.playerTurn = False
|
||||
else:
|
||||
addCardToHand(self.dealerHand, self.deck)
|
||||
self.playerTurn = True
|
||||
|
||||
def checkHandState(self, hand):
|
||||
# Check the hand state and return w if game is won, l if lost and c for continue
|
||||
total = getHandTotal(hand)
|
||||
|
||||
if total == 21:
|
||||
return "w"
|
||||
elif total > 21:
|
||||
return "l"
|
||||
else:
|
||||
return "c"
|
||||
|
||||
def dealerHitLogic(self):
|
||||
total = getHandTotal(self.dealerHand)
|
||||
if total >= 17:
|
||||
self.stand()
|
||||
return True
|
||||
else:
|
||||
self.hit()
|
||||
|
||||
|
||||
def checkGameOver(self, state):
|
||||
gameOver = False
|
||||
if state == "w":
|
||||
gameOver = True
|
||||
elif state == "l":
|
||||
gameOver = True
|
||||
return gameOver
|
||||
|
||||
def compareHands(self):
|
||||
dealerTotal = getHandTotal(self.dealerHand)
|
||||
playerTotal = getHandTotal(self.playerHand)
|
||||
if dealerTotal < playerTotal:
|
||||
return "l"
|
||||
else:
|
||||
return "w"
|
||||
|
||||
async def play_game(self, ID, bet, recv, send):
|
||||
|
||||
if self.gameInSession:
|
||||
await send("Fuck you")
|
||||
return
|
||||
else:
|
||||
self.gameInSession = True
|
||||
gameState = INIT
|
||||
|
||||
while gameState != OVER:
|
||||
|
||||
if gameState == INIT:
|
||||
|
||||
self.returnCards()
|
||||
playerStats = self.ledger.read(ID)
|
||||
if playerStats is None:
|
||||
self.ledger.write(ID)
|
||||
playerStats = self.ledger.read(ID)
|
||||
self.deal()
|
||||
playerWinState = self.checkHandState(self.playerHand)
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
|
||||
play = None
|
||||
playerStood = False
|
||||
dealerStood = False
|
||||
validInput = False
|
||||
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == PLAYING:
|
||||
|
||||
await send("Players hand = " + str(getHandTotal(self.playerHand)) + ": " + handNumbersToCards(
|
||||
self.playerHand) + "\n" + "Dealers hand = ??: " + convertNumberToCard(self.dealerHand[0]) + "??")
|
||||
play = await recv("Hit or Stand?")
|
||||
while not validInput:
|
||||
if play == "h":
|
||||
self.hit()
|
||||
validInput = True
|
||||
elif play == "s":
|
||||
self.stand()
|
||||
playerStood = True
|
||||
validInput = True
|
||||
|
||||
dealerStood = self.dealerHitLogic()
|
||||
playerWinState = self.checkHandState(self.playerHand)
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == ENDING:
|
||||
|
||||
# Players turn
|
||||
self.stand()
|
||||
# Dealers turn
|
||||
dealerStood = self.dealerHitLogic()
|
||||
# Loop ends when game is over
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
if dealerStood:
|
||||
|
||||
if dealerWinState == "c":
|
||||
|
||||
dealerWinState = self.compareHands()
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == CHECKING:
|
||||
|
||||
if self.checkGameOver(playerWinState) or self.checkGameOver(dealerWinState):
|
||||
gameState = FINISHED
|
||||
elif playerStood:
|
||||
gameState = ENDING
|
||||
else:
|
||||
gameState = PLAYING
|
||||
|
||||
elif gameState == FINISHED:
|
||||
|
||||
await send("Players hand = " + str(getHandTotal(self.playerHand)) + ": " + handNumbersToCards(self.playerHand) +
|
||||
"\n" + "Dealers hand = " + str(getHandTotal(self.dealerHand)) + ": " + handNumbersToCards(self.dealerHand))
|
||||
if playerWinState == "w":
|
||||
await send("You won!")
|
||||
win = (2*bet, 1, 0, ID)
|
||||
self.ledger.update(ID, win)
|
||||
elif playerWinState == "l":
|
||||
await send("You busted!")
|
||||
loss = (-bet, 0, 1, ID)
|
||||
self.ledger.update(ID, loss)
|
||||
elif dealerWinState == "w":
|
||||
await send("The Dealer reached 21 before you!")
|
||||
loss = (-bet, 0, 1, ID)
|
||||
self.ledger.update(ID, loss)
|
||||
elif dealerWinState == "l":
|
||||
await send("The Dealer busted before you!")
|
||||
win = (2*bet, 1, 0, ID)
|
||||
self.ledger.update(ID, win)
|
||||
|
||||
self.returnCards()
|
||||
if len(self.deck) < 0.25 * 52:
|
||||
await send("Shuffling Deck")
|
||||
self.shuffle()
|
||||
|
||||
gameState = OVER
|
||||
self.gameInSession = False
|
||||
271
Recycle Bin/BlackJackBot/BlackJackTest.py
Normal file
271
Recycle Bin/BlackJackBot/BlackJackTest.py
Normal file
@@ -0,0 +1,271 @@
|
||||
import random
|
||||
import Ledger
|
||||
|
||||
# Game States
|
||||
INIT = 0
|
||||
PLAYING = 1
|
||||
ENDING = 2
|
||||
FINISHED = 3
|
||||
OVER = 5
|
||||
CHECKING = 6
|
||||
|
||||
|
||||
|
||||
def convertNumberToCard(cardNumber):
|
||||
# Cards index from 0 i.e ace is 0, and the highest card value is 51
|
||||
if cardNumber <= 12:
|
||||
cardSuit = "♣"
|
||||
elif cardNumber <= 25:
|
||||
cardSuit = "♦"
|
||||
elif cardNumber <= 38:
|
||||
cardSuit = "♥"
|
||||
elif cardNumber <= 51:
|
||||
cardSuit = "♠"
|
||||
|
||||
cardNumber = cardNumber % 13
|
||||
|
||||
if cardNumber == 0:
|
||||
cardNumber = "A"
|
||||
elif cardNumber == 10:
|
||||
cardNumber = "J"
|
||||
elif cardNumber == 11:
|
||||
cardNumber = "Q"
|
||||
elif cardNumber == 12:
|
||||
cardNumber = "K"
|
||||
else:
|
||||
cardNumber += 1
|
||||
|
||||
return "{value}{suit} ".format(value=str(cardNumber), suit=cardSuit)
|
||||
|
||||
def generateDeck():
|
||||
return [x for x in range(0, 51)]
|
||||
|
||||
def addCardToHand(hand, deck):
|
||||
card = deck.pop(0)
|
||||
hand.append(card)
|
||||
|
||||
def generateHand(hand, deck, handSize = 2):
|
||||
i = 0
|
||||
while i < handSize:
|
||||
addCardToHand(hand, deck)
|
||||
i += 1
|
||||
|
||||
def handNumbersToCards(hand):
|
||||
cards = ""
|
||||
for card in hand:
|
||||
cards += convertNumberToCard(card)
|
||||
return cards
|
||||
|
||||
def getHandTotal(hand):
|
||||
cardValue = lambda c: min(c % 13 + 1, 10)
|
||||
i = 0
|
||||
aces = 0
|
||||
for card in hand:
|
||||
card = cardValue(card)
|
||||
if card == 1:
|
||||
aces += 1
|
||||
else:
|
||||
i += card
|
||||
|
||||
while aces > 0:
|
||||
if i < 20:
|
||||
card = 11
|
||||
if (i + card) > 21:
|
||||
card = 1
|
||||
i += card
|
||||
aces -= 1
|
||||
return i
|
||||
|
||||
def showDeck(deck):
|
||||
string = ""
|
||||
for card in deck:
|
||||
string += convertNumberToCard(card)
|
||||
return string
|
||||
|
||||
class BlackJack:
|
||||
def __init__(self):
|
||||
self.gameInSession = False
|
||||
self.playerTurn = True
|
||||
self.deck = generateDeck()
|
||||
random.shuffle(self.deck)
|
||||
self.discard = []
|
||||
self.playerHand = []
|
||||
self.dealerHand = []
|
||||
self.ledger = Ledger.Ledger()
|
||||
|
||||
def returnCards(self):
|
||||
self.discard.extend(self.playerHand)
|
||||
self.playerHand.clear()
|
||||
self.discard.extend(self.dealerHand)
|
||||
self.dealerHand.clear()
|
||||
|
||||
def deal(self):
|
||||
generateHand(self.playerHand, self.deck)
|
||||
generateHand(self.dealerHand, self.deck)
|
||||
|
||||
def shuffle(self):
|
||||
self.deck.extend(self.discard)
|
||||
self.discard.clear()
|
||||
random.shuffle(self.deck)
|
||||
|
||||
def stand(self):
|
||||
if self.playerTurn:
|
||||
self.playerTurn = False
|
||||
|
||||
def hit(self):
|
||||
if self.playerTurn:
|
||||
addCardToHand(self.playerHand, self.deck)
|
||||
self.playerTurn = False
|
||||
else:
|
||||
addCardToHand(self.dealerHand, self.deck)
|
||||
self.playerTurn = True
|
||||
|
||||
def checkHandState(self, hand):
|
||||
# Check the hand state and return w if game is won, l if lost and c for continue
|
||||
total = getHandTotal(hand)
|
||||
|
||||
if total == 21:
|
||||
return "w"
|
||||
elif total > 21:
|
||||
return "l"
|
||||
else:
|
||||
return "c"
|
||||
|
||||
def dealerHitLogic(self):
|
||||
total = getHandTotal(self.dealerHand)
|
||||
if total > 17:
|
||||
self.stand()
|
||||
return True
|
||||
else:
|
||||
self.hit()
|
||||
|
||||
|
||||
def checkGameOver(self, state):
|
||||
gameOver = False
|
||||
if state == "w":
|
||||
gameOver = True
|
||||
elif state == "l":
|
||||
gameOver = True
|
||||
return gameOver
|
||||
|
||||
def compareHands(self):
|
||||
dealerTotal = getHandTotal(self.dealerHand)
|
||||
playerTotal = getHandTotal(self.playerHand)
|
||||
if dealerTotal < playerTotal:
|
||||
return "l"
|
||||
else:
|
||||
return "w"
|
||||
|
||||
def play_game(self, ID, bet, recv, send):
|
||||
|
||||
if self.gameInSession:
|
||||
send("Fuck you")
|
||||
return
|
||||
else:
|
||||
self.gameInSession = True
|
||||
gameState = INIT
|
||||
|
||||
while gameState != OVER:
|
||||
|
||||
if gameState == INIT:
|
||||
|
||||
self.returnCards()
|
||||
playerStats = self.ledger.read(ID)
|
||||
if playerStats is None:
|
||||
self.ledger.write(ID)
|
||||
playerStats = self.ledger.read(ID)
|
||||
self.deal()
|
||||
playerWinState = self.checkHandState(self.playerHand)
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
|
||||
play = None
|
||||
playerStood = False
|
||||
dealerStood = False
|
||||
validInput = False
|
||||
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == PLAYING:
|
||||
|
||||
send("Players hand = " + str(getHandTotal(self.playerHand)) + ": " + handNumbersToCards(
|
||||
self.playerHand) + "\n" + "Dealers hand = ??: " + convertNumberToCard(self.dealerHand[0]) + "??")
|
||||
play = recv("Hit or Stand?")
|
||||
while not validInput:
|
||||
if play == "h":
|
||||
self.hit()
|
||||
validInput = True
|
||||
elif play == "s":
|
||||
self.stand()
|
||||
playerStood = True
|
||||
validInput = True
|
||||
|
||||
dealerStood = self.dealerHitLogic()
|
||||
playerWinState = self.checkHandState(self.playerHand)
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == ENDING:
|
||||
|
||||
# Players turn
|
||||
self.stand()
|
||||
# Dealers turn
|
||||
dealerStood = self.dealerHitLogic()
|
||||
# Loop ends when game is over
|
||||
dealerWinState = self.checkHandState(self.dealerHand)
|
||||
if dealerStood:
|
||||
|
||||
if dealerWinState == "c":
|
||||
|
||||
dealerWinState = self.compareHands()
|
||||
gameState = CHECKING
|
||||
|
||||
elif gameState == CHECKING:
|
||||
|
||||
if self.checkGameOver(playerWinState) or self.checkGameOver(dealerWinState):
|
||||
gameState = FINISHED
|
||||
elif playerStood:
|
||||
gameState = ENDING
|
||||
else:
|
||||
gameState = PLAYING
|
||||
|
||||
elif gameState == FINISHED:
|
||||
|
||||
send("Players hand = " + str(getHandTotal(self.playerHand)) + ": " + handNumbersToCards(self.playerHand) +
|
||||
"\n" + "Dealers hand = " + str(getHandTotal(self.dealerHand)) + ": " + handNumbersToCards(self.dealerHand))
|
||||
if playerWinState == "w":
|
||||
send("You won!")
|
||||
win = (2*bet, 1, 0, ID)
|
||||
self.ledger.update(ID, win)
|
||||
elif playerWinState == "l":
|
||||
send("You busted!")
|
||||
loss = (-bet, 0, 1, ID)
|
||||
self.ledger.update(ID, loss)
|
||||
elif dealerWinState == "w":
|
||||
send("The Dealer reached 21 before you!")
|
||||
loss = (-bet, 0, 1, ID)
|
||||
self.ledger.update(ID, loss)
|
||||
elif dealerWinState == "l":
|
||||
send("The Dealer busted before you!")
|
||||
win = (2*bet, 1, 0, ID)
|
||||
self.ledger.update(ID, win)
|
||||
|
||||
self.returnCards()
|
||||
if len(self.deck) < 0.25 * 52:
|
||||
send("Shuffling Deck")
|
||||
self.shuffle()
|
||||
|
||||
gameState = OVER
|
||||
self.gameInSession = False
|
||||
|
||||
def send(str):
|
||||
return input(str)
|
||||
|
||||
def main():
|
||||
|
||||
bj = BlackJack()
|
||||
bj.play_game(12, 100, send, print)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
BIN
Recycle Bin/BlackJackBot/__pycache__/BlackJack.cpython-310.pyc
Normal file
BIN
Recycle Bin/BlackJackBot/__pycache__/BlackJack.cpython-310.pyc
Normal file
Binary file not shown.
BIN
Recycle Bin/BlackJackBot/__pycache__/BlackJack.cpython-39.pyc
Normal file
BIN
Recycle Bin/BlackJackBot/__pycache__/BlackJack.cpython-39.pyc
Normal file
Binary file not shown.
0
Recycle Bin/BlackJackBot/ledger.txt
Normal file
0
Recycle Bin/BlackJackBot/ledger.txt
Normal file
34
Recycle Bin/Gamepicker.py
Normal file
34
Recycle Bin/Gamepicker.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import discord
|
||||
import random
|
||||
|
||||
# Temporary List
|
||||
# games = ["Left 4 Dead 2",
|
||||
# "Aragami",
|
||||
# "Astroneer",
|
||||
# "Factorio",
|
||||
# "Borderlands",
|
||||
# "Stardew Valley",
|
||||
# "Viscera Cleanup Detail",
|
||||
# "SCP",
|
||||
# "Satisfactory",
|
||||
# "Ghost Recon Wildlands"
|
||||
# ]
|
||||
|
||||
games = ["Plate Up",
|
||||
"Terraria",
|
||||
"Ghost Recon"]
|
||||
|
||||
def add_game(game: str):
|
||||
games.append(game)
|
||||
|
||||
def pick_game():
|
||||
|
||||
randomIndex = random.randrange(0, len(games))
|
||||
coinFlip = random.randrange(0, 2)
|
||||
if coinFlip:
|
||||
|
||||
return f"Valorant ({games[randomIndex]})"
|
||||
else:
|
||||
|
||||
return games[randomIndex]
|
||||
|
||||
20
Recycle Bin/docker-compose.yml
Normal file
20
Recycle Bin/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
version: "3.3"
|
||||
|
||||
networks:
|
||||
net:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
acronymbot:
|
||||
build: ./src/py
|
||||
volumes:
|
||||
- "./src/py:/usr/app/src"
|
||||
networks:
|
||||
- "net"
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
database:
|
||||
image: mariadb:latest
|
||||
networks:
|
||||
- "net"
|
||||
65
Recycle Bin/list.txt
Normal file
65
Recycle Bin/list.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
Schemas -
|
||||
GAMEINFO:
|
||||
ID, NAME, GENRE, GAMEPASS
|
||||
|
||||
WHOOWNSIT (bitmap index):
|
||||
ID, MARCUS, BENSON, ALEX, TIM, AIDAN
|
||||
|
||||
GAMEFACTORS:
|
||||
ID, BRAINLEVEL, TIMETOPLAY, CAMPAIGN
|
||||
|
||||
|
||||
Satisfactory MBA
|
||||
Factorio MBA
|
||||
Magicka 2 MBAT
|
||||
Phasmo MBA
|
||||
RS6 MBAT
|
||||
VCD MBA
|
||||
DRG MBAT
|
||||
Star Dew MBA
|
||||
Minecraft MBAT
|
||||
TTSim MBAT
|
||||
BTD6 MBAT
|
||||
ARMA3 MBA
|
||||
Blood and Bacon MBAT
|
||||
NMRIH MBAT
|
||||
GMOD MBAT
|
||||
INSIDE THE BACKROOMS MBAT
|
||||
PZ MBAT
|
||||
READY OR NOT MBAT
|
||||
SCP MBAT
|
||||
WITCH IT MBA
|
||||
BAUROTRAUMA MA
|
||||
BORDERLANDS 3 MBA
|
||||
BORDERLANDS 2 MBA
|
||||
BORDERLANDS THE PRE SEQUEL MBA
|
||||
CSGO MBA
|
||||
GTAV MBA
|
||||
CREATIVERSE MBA
|
||||
Dying Light MBA
|
||||
The forest MBA
|
||||
RDRO MBAT
|
||||
Risk of Rain MBAT
|
||||
ROTMG MBAT
|
||||
L4D2 MBAT
|
||||
Unturned MBAT
|
||||
Due Process MBA
|
||||
Valorant MBAT
|
||||
Terraria MA
|
||||
Modded Minecraft MBAT
|
||||
Warframe MBAT
|
||||
Ghost recon wildlands (if tim buys)
|
||||
Ghost Recon Breakpoint MBA
|
||||
Rocket League BM
|
||||
OW2 MBAT
|
||||
ROBLOX MBAT (Prison Royale)
|
||||
|
||||
Gamepass Game:
|
||||
Aragami
|
||||
Sea of theives
|
||||
Astroneer
|
||||
GWYF
|
||||
No Mans Sky
|
||||
Valheim
|
||||
Power Wash Sim
|
||||
B4B
|
||||
5
Recycle Bin/plan.txt
Normal file
5
Recycle Bin/plan.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Microservices:
|
||||
- Some sort of database for storing the data
|
||||
- Image for the python code that runs the bot
|
||||
- Something to interface the two, like sparkSQL for interacting with the database
|
||||
|
||||
2
Recycle Bin/run.sh
Normal file
2
Recycle Bin/run.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker run -it --rm --name bot acrybot
|
||||
3
Recycle Bin/update.sh
Normal file
3
Recycle Bin/update.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
docker image rm acrybot
|
||||
docker build -t acrybot .
|
||||
Reference in New Issue
Block a user