예제 #1
0
 def change_game():
     from Live import load_game
     os.system('clear')
     game_to_play = load_game()
     game_id = game_to_play[0]
     difficulty = game_to_play[1]
     GameManager.run(game_id, difficulty)
예제 #2
0
def start():
    # pick a game
    load_game_list = load_game()
    game_id = load_game_list[0]
    difficulty = load_game_list[1]

    print("You will Play = ", game_id, "Difficulty = ", difficulty)

    # load the chosen game

    game_to_play = GameManager(game_id, difficulty)
    game_to_play.run(game_id, difficulty)
예제 #3
0
def main():
    screen_cleaner()

    print(f"""
    Welcome to the
    
 _       __           __    __         ____                                  
| |     / /___  _____/ /___/ /  ____  / __/  ____ _____ _____ ___  ___  _____
| | /| / / __ \/ ___/ / __  /  / __ \/ /_   / __ `/ __ `/ __ `__ \/ _ \/ ___/
| |/ |/ / /_/ / /  / / /_/ /  / /_/ / __/  / /_/ / /_/ / / / / / /  __(__  ) 
|__/|__/\____/_/  /_/\__,_/   \____/_/     \__, /\__,_/_/ /_/ /_/\___/____/  
                                          /____/
""")
    print(welcome("Tsahhi"))
    go_for_play = True
    while go_for_play:
        game_index, difficulty = load_game()
        if game_index == 1:
            game_to_play = MemoryGame
        elif game_index == 2:
            game_to_play = GuessGame
        else:
            game_to_play = CurrencyRouletteGame

        won_the_game = game_to_play(difficulty).play()

        if won_the_game:
            add_score(difficulty)
            print("Way to go, you winner! dare for another round?")
        else:
            print("Better luck next time- want to take this time right now?")
        continue_str = "Please enter Y or N: "
        should_continue = input(continue_str).lower().strip()
        valid_options = ['y', 'n']
        while should_continue not in valid_options:
            should_continue = input(continue_str).lower().strip()
        go_for_play = should_continue == 'y'

    print("Thank you for playing in the World of Games!")
예제 #4
0
def main():

    print_banner()

    user_name = input_name()

    if 'Q' == user_name:
        return

    welcome(user_name)

    while True:
        sel = load_game()
        if '1' == sel:
            g1()
        elif '2' == sel:
            g2()
        elif '3' == sel:
            g3()
        elif '3' == sel:
            return
        elif 'Q' == sel:
            return
예제 #5
0
class MainGame:
    welcome(name=input("Please Enter You Name:" + "\n"))

    game_number = load_game()

    difficulty = choose_level()

    if int(game_number) == 1:
        MemoryGame.play(difficulty)

    elif int(game_number) == 2:
        GuessGame.play(difficulty)

    elif int(game_number) == 3:
        CurrencyRouletteGame.play(difficulty)

#print result and add score
    if status:
        add_score(game_difficulty, user_name)
        print("Great job , you won")
    else:
        print("You lost , try again")

    p_continue = input("do you want to play again y or n ?")
예제 #6
0
def gussgame():
    load_game(2)
    print("finish guessgame")
예제 #7
0
def main():
    print(welcome('Guy'))
    while True:
        load_game()
예제 #8
0
from Live import welcome, load_game, difficulty

print(welcome('Evgeny'))
print('\n')
print(load_game())
print('\n')
print(difficulty())

예제 #9
0
def main():
    print(welcome("Player"))
    load_game()
예제 #10
0
from Live import load_game, welcome

print(welcome("Daniel"))
load_game()
예제 #11
0
from Live import load_game, welcome,choose_level
from GuessGame import ggplay
from MemoryGame import mgplay
from CurrencyRouletteGame import crgpaly
from Utils import Screen_cleaner
from Score import add_score

p_continue = 'y'
user_name = "asa" #input('insert your name:')

while p_continue == 'y':
    Screen_cleaner()
    print(welcome(user_name))
    #get game number and level
    game_number = load_game()
    game_difficulty = choose_level()


    if int(game_number)==1:
        status = ggplay(game_difficulty)
    elif int(game_number)==2:
        status = mgplay(game_difficulty)
    elif int(game_number)==3:
        status = crgpaly(game_difficulty)

    #print result and add score
    if status:
        add_score(game_difficulty,user_name)
        print("Great job , you won")
    else:
        print("You lost , try again")
예제 #12
0
from Live import load_game, welcome
name = input('Enter Your Name:')
print(welcome(name))
win = False
#initialzing win condition
while win == False:
    win = load_game()
print('Have a Nice Day, come play again...')
예제 #13
0
from Live import welcome, load_game, level
from Utils import score_file_name
from e2e import main_function
import time

user_continue = 'y'
while user_continue == 'y':

    welcome()
    game_num = load_game()
    level(game_num)
    score_file_name()
    main_function()
    user_continue = input("Do you want to continue? y/n: ")
    if user_continue != 'y':
        print("Thank you for playing World of Games")
        time.sleep(3)
        exit(1)
예제 #14
0
def main():
    name = input("Welcome, please enter your name: ")
    print("\n" + welcome(name))
    load_game()
예제 #15
0
def memorygame():
    load_game(1)
    print("finish memorygame")
예제 #16
0
from Live import welcome, load_game
from Score import add_score

print(welcome("Adi"))
game, level = load_game()

if game == 1:
    import MemoryGame

    game_res = MemoryGame.play(level)

    if game_res == True:
        add_score(points=level)
        print("You Won")
    else:
        print("You Lost")

elif game == 2:
    import GuessGame
    game_res = GuessGame.play(level)

    if game_res == True:
        add_score(points=level)
        print("You Won")
    else:
        print("You Lost")
예제 #17
0
# The purpose of this file is to call the functions from Live.py

from Live import welcome, load_game

#Calling starting functions welcome & load_game to start the game

name = input("What's your name? \n")
welcome(name)
result = 0
#Looping the load game in case of player's game over with loss.
while result == 0:
    result = load_game()



예제 #18
0
파일: main.py 프로젝트: saggie-hen/DevOps
from Live import welcome, load_game
from GuessGame import GuessGame
from MemoryGame import MemoryGame
from CurrencyRouletteGame import CurrencyRouletteGame

welcome("Saggie")
gameNumber, gameDifficulty = load_game()

if gameNumber == 1:
    game = MemoryGame(gameDifficulty)
    game.play()
elif gameNumber == 2:
    game = GuessGame(gameDifficulty)
    game.play()
elif gameNumber == 3:
    game = CurrencyRouletteGame(gameDifficulty)
    game.play()
예제 #19
0
from Live import load_game, welcome

print(welcome("Guy"))
select = load_game()