You can now go back in time! With "!hex undo" !

This commit is contained in:
jona605a
2020-08-08 14:16:31 +02:00
parent 08851182a7
commit 8be15b6dd5
2 changed files with 29 additions and 16 deletions

View File

@ -16,7 +16,7 @@ HEXAGONHEIGHT = 1.5 * SIDELENGTH # not really the entire height, but the height
FONTSIZE = 45
TEXTCOLOR = (0,0,0)
fnt = ImageFont.truetype('resources/futura-bold.ttf', FONTSIZE)
PIECECOLOR = {1:(237,41,57),2:(0,165,255)} # player1 is red, player2 is blue
LINETHICKNESS = 15
HEXTHICKNESS = 6
X_THICKNESS = HEXTHICKNESS * math.cos(math.pi/6)
@ -24,6 +24,7 @@ Y_THICKNESS = HEXTHICKNESS * math.sin(math.pi/6)
BACKGROUND_COLOR = (230,230,230)
BETWEEN_COLOR = BACKGROUND_COLOR
BLANK_COLOR = "lightgrey" # maybe lighter?
PIECECOLOR = {1:(237,41,57),2:(0,165,255),0:BLANK_COLOR} # player1 is red, player2 is blue
BOARDCOORDINATES = [ [(X_OFFSET + HEXAGONWIDTH*(column + row/2),Y_OFFSET + HEXAGONHEIGHT*row) for column in range(11)] for row in range(11)] # These are the coordinates for the upperleft corner of every hex
COLHEXTHICKNESS = 4
COLX_THICKNESS = COLHEXTHICKNESS * math.cos(math.pi/6)
@ -164,14 +165,3 @@ def drawHexPlacement(channel,player,position):
im.save(FILEPATH)
except:
logThis("Error drawing new hex on board (error code 1541")
if __name__ == '__main__':
drawBoard("resources/games/hexBoards/boardTest.png")
drawHexPlacement("resources/games/hexBoards/boardTest.png",1,"f7")
drawHexPlacement("resources/games/hexBoards/boardTest.png",2,"f8")
drawHexPlacement("resources/games/hexBoards/boardTest.png",1,"h6")
drawHexPlacement("resources/games/hexBoards/boardTest.png",2,"e8")
drawHexPlacement("resources/games/hexBoards/boardTest.png",1,"e7")
drawHexPlacement("resources/games/hexBoards/boardTest.png",2,"c9")
drawHexPlacement("resources/games/hexBoards/boardTest.png",1,"g8")
drawHexPlacement("resources/games/hexBoards/boardTest.png",2,"h4")