def main():
    utill.print_header('There is no internet and i am suffering')
    players = ['Player 1', 'Player 2']
    active_player_index = 0
    player = players[active_player_index]
    # list_players(player, players)
    player_name = input('Hello player what is your name? \n')
    player = player_name
    # print(player)
    # list_players(player, players)
    first_choose(player, players)
    are_you_not_entertained()
def main():
    utill.print_header('Tic Tac Toe')
    # Board is a list of rows
    # rows are a list of cells
    board = [
        [None, None, None],
        [None, None, None],
        [None, None, None]
    ]

    # choose initial player
    active_player_index = random.randrange(2)
    # the first player is index/number 0 the second player is index/number 1
    # ie. player 1 is 0 player 2 is 1
    # active_player_index = 0
    players = ["Jacob", "Computer"]
    symbols = ["X", "O"]
    player = players[active_player_index]
    # UNTIL SOMEONE WINS
    while not find_winner(board):
        player = players[active_player_index]
        symbol = symbols[active_player_index]

        announce_turn(player)
        show_board(board)

        if active_player_index == 0:
            if not choose_location(board, symbol):
                print("that's not a option, try again.")
                continue
        else:
            if not ai_roll(board, symbol):
                print("that's not a option, try again.")
                continue
        # toggle active player
        active_player_index = (active_player_index + 1) % len(players)
    print()
    print(f'Game Over {player} has won with the board: ')
    show_board(board)
    print()
Esempio n. 3
0
import utill

utill.print_header('...Testing...')
Esempio n. 4
0
def main():
    utill.print_header(code_name='BIRTHDAY APP')
    bday = get_birthday_from_user()
    today = datetime.date.today()
    number_of_days = compute_days_between_dates(bday, today)
    print_birthday_info(number_of_days)
Esempio n. 5
0
import utill

import os

utill.print_header(code_name='File Fuckery')

# print(os.environ.get('USERPROFILE'))

os.chdir('C:\\Users\\gamme')

print(os.getcwd())  # gets the current working directory / folder

# for dirpath, dirnames, filenames in os.walk('C:\\Users\\gamme'):
#     print('current path: ', dirpath)
#     print('Dir: ', dirnames)
#     print('files', filenames)
#     print()

#print(os.path.isdir('C:\\Users\\gamme\\file_fuckery'))   # prints false since there is no fsdf folder
# print(os.path.isfile('D:\\fsdf'))   # prints false since there is no fsdf file
# print(os.path.splitext('D:\\tmp\\test.txt'))   # splits the file type off ie.
#  ('D:\\tmp\\test', '.txt')

file_fuck_path = os.path.isdir('C:\\Users\\gamme\\file_fuckery')

while file_fuck_path is False:
    os.mkdir('file_fuckery')
    os.chdir('C:\\Users\\gamme\\file_fuckery')
    os.makedirs('demo_1')
    break
Esempio n. 6
0
def main():
    utill.print_header('mm')
    print("Guess the number of M&Ms and you get lunch on the house!\n")
    loop()
Esempio n. 7
0
import utill

utill.print_header(code_name='HELLO APP')

user_text = input('what is your name?')
greeting = 'nice to meet you ' + user_text

print(greeting)
import game_code

import utill

# todo: add main()

utill.print_header('Guessing game')

player_name = input('Hello player what is your name? \n')
print(f'Hello {player_name} welcome to the game \n')
user_input_main_loop = 'EMPTY'
while user_input_main_loop != 'x' and user_input_main_loop:
    user_input_main_loop = input('[P]lay game, E[x]it: ')
    user_input_main_loop = user_input_main_loop.lower().strip()
    if user_input_main_loop == 'p':
        print('Starting Game \n')
        print('You have seven tries')
        game_code.guessing_game()
    elif user_input_main_loop == 'x' and user_input_main_loop:
        print('Thanks for playing')
Esempio n. 9
0
def main():
    utill.print_header(code_name='Journal app')
    run_event_loop()
Esempio n. 10
0
def main():
    utill.print_header('Rock Paper Scissors')
    player_1 = input('player 1 enter name\n')
    player_2 = 'computer'
    play_game(player_1, player_2)
Esempio n. 11
0
#  testing things

import utill

utill.print_header('shaus')

shit_fuck = open('ftest.txt')
print(shit_fuck.readlines())



def whole_rps(player):
    utill.print_header('Rock Paper Scissors')
    player_1 = player
    player_2 = 'computer'
    play_game(player_1, player_2)