repl.it
@me002/

Tourists And Spies

Python

No description

fork
loading
Files
  • main.py
  • touristMod.py
  • Packager files
  • poetry.lock
  • pyproject.toml
  • 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
# Modules #

import touristMod
import math
import time
import random
from termcolor import cprint, colored
import os


# Functions #
def clear(wait = 1.5):
    time.sleep(wait)
    os.system("clear")

def ans(x = ">>| ", color = "cyan", clearBool = True,  wait = 1):
    x = input(colored(x, color))
    if clearBool: clear(wait)
    return x

def playerCountCheck():
    cprint("How many players are there? (2-6)")
    try: pc = int(ans())
    except: playerCountCheck()
    if pc > 2 and pc < 6: return pc
    else: playerCountCheck()
# Deck Object #
class player:
    def __init__(self):
        self.x = 10


class deck:
    def __init__(self):
        global playerCount, players
        playerCount = playerCountCheck() # 3 is default
        players = {}
        for i in range(1, playerCount + 1): players[f"player{i}"] = player()
        tortist




pile = deck()
Fetching token
?