repl.it
@Lord_Poseidon/

that game thing-1

Pygame

No description

fork
loading
Files
  • main.py
  • dice_faces
  • rounded_rects
  • smalltokens
  • tokens
  • actions.py
  • board.jpg
  • board.py
  • BTC.png
  • chat.py
  • dice.py
  • info.py
  • lobby.py
  • money.py
  • nohup.out
  • status.py
  • swear.txt
  • Packager files
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import pygame
import chat
import threading
import rounded_rects
import money
import dice
import lobby
import time
import requests
import status
import board
import actions
pygame.init()
pygame.font.init()
medfont = pygame.font.Font(None, 50)
bigfont = pygame.font.Font(None, 100)
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
screen.fill((0, 0, 0))
pygame.display.set_caption('Distopian Monopoly')
screen.blit(
    medfont.render('Welcome, Human, to a game of', True, (255, 255, 255)),
    (100, 100))
screen.blit(
    bigfont.render('Dystopian Monopoly', True, (255, 255, 255)), (50, 200))
screen.blit(
    medfont.render('by Broken Code', True, (255, 255, 255)), (400, 500))
pygame.display.update()
time.sleep(5)
screen.fill((0, 0, 0))
textbox = pygame.Surface((400, 40))
textbox.fill((255, 255, 255))
screen.blit(textbox, (200, 360))
pygame.display.update()
name, gameid = lobby.start(screen)
screen.fill((0, 0, 0))
pygame.display.update()
crashed = False
clock = pygame.time.Clock()
threading.Thread(target=chat.takeinput, args=(screen, gameid)).start()
chatbox, editbox = rounded_rects.AAfilledRoundedRect(
    [0, 0, 200, 370], (27, 36, 42)), rounded_rects.AAfilledRoundedRect(
        [0, 0, 200, 30], (255, 255, 255), True)
moneybox = rounded_rects.AAfilledRoundedRect([0, 0, 200, 150], (27, 36, 42))
statbox = rounded_rects.AAfilledRoundedRect([0, 0, 200, 150], (27, 36, 42))
actionbox = rounded_rects.AAfilledRoundedRect([0, 0, 200, 200], (27, 36, 42))
infobox = rounded_rects.AAfilledRoundedRect([0, 0, 600, 200], (27, 36, 42))
screen.blit(chatbox, (0, 0))
screen.blit(editbox, (0, 370))
screen.blit(moneybox, (600, 0))
screen.blit(statbox, (600, 250))
screen.blit(actionbox, (600, 400))
screen.blit(infobox, (0, 400))
screen.blit(pygame.image.load('board.jpg'),(200, 0))
url = 'https://thegamebackend-1--lord-poseidon.repl.co'
pygame.display.update()
print(requests.get(url + f'/{gameid}/otherdata').text)

while not crashed:
    chat.print_msgs(screen)
    money.update(screen, name, gameid)
    dice.update(screen)
    status.update(screen, gameid)
    actions.update(screen, gameid, name)
    board.update(screen, gameid)
    pygame.display.update()
    clock.tick(100)
    time.sleep(1)
?