This commit is contained in:
NikolajDanger
2020-08-13 17:27:37 +02:00
parent 8005acf42a
commit 4f30c6a196
6 changed files with 9 additions and 14 deletions

View File

@@ -599,7 +599,6 @@ class Blackjack():
else:
reason = "(highest value)"
if topLevel:
if hand["split"] >= 1:
winningsTemp, netWinningsTemp, reasonTemp = self.calcWinnings(hand["other hand"],dealerValue,False,dealerBlackjack,dealerBusted)

View File

@@ -173,8 +173,8 @@ class FourInARow():
winDirection = ""
winCoordinates = [0,0]
for row in range(len(board)):
for place in range(len(board[row])):
for row in range(rowCount):
for place in range(columnCount):
if won == 0:
piecePlayer = board[row][place]
if piecePlayer != 0:

View File

@@ -82,7 +82,6 @@ class HexGame():
else:
return "I didn't get that. Use \"!hex start [opponent]\" to start a game, \"!hex place [position]\" to place a piece, \"!hex undo\" to undo your last move or \"!hex stop\" to stop a current game.", False, False, False, False
# Starts the game
def hexStart(self, channel, user, opponent):
game = self.bot.database["hex games"].find_one({"_id":channel})
@@ -155,7 +154,6 @@ class HexGame():
turn = 1 if turn == 2 else 2
self.bot.database["hex games"].update_one({"_id":channel},{"$set":{"turn":turn}})
# Checking for a win
logThis("Checking for win")
winner = self.evaluateBoard(game["board"])[1]

View File

@@ -1,5 +1,4 @@
import math
import os
from PIL import Image, ImageDraw, ImageFont
from funcs import logThis
@@ -164,7 +163,7 @@ class DrawHex():
# Write player names and color
for p in [1,2]:
playername = getName(game["players"][p%2])
playername = self.bot.funcs.getName(game["players"][p%2])
x = X_NAME[p]
x -= NAME_fnt.getsize(playername)[0] if p==2 else 0 # player2's name is right-aligned

View File

@@ -7,7 +7,6 @@ import time # Used for logging
import logging # Used for... you know... logging
import wikia # Used by findWikiPage
import os # Used by makeFiles
import pymongo # Used by transferUsers
logging.basicConfig(filename="gwendolyn.log", level=logging.INFO)