def WelcomeBanner() -> str: ''' Prints a welcome banner to introduce the console version of Connect Four ''' print(Fore.YELLOW) Project2commonUI.delay_print('\n**********************************************\n') # the following function prints the welcome banner Project2commonUI.delay_print('** WELCOME TO CONNECT FOUR - VERSUS MODE!!! **\n') Project2commonUI.delay_print('**********************************************\n') time.sleep(1.5)
def WelcomeBanner() -> str: ''' Prints a welcome banner to introduce the console version of Connect Four ''' print() Project2commonUI.delay_print('\n************************************************\n') Project2commonUI.delay_print('***** WELCOME TO CONNECT FOUR - NETWORK *****\n') # Prints the welcome message! Project2commonUI.delay_print('************************************************\n\n') time.sleep(1.5)
def WelcomeBanner() -> str: ''' Prints a welcome banner to introduce the console version of Connect Four ''' print(Fore.YELLOW) Project2commonUI.delay_print( '\n**********************************************\n' ) # the following function prints the welcome banner Project2commonUI.delay_print( '** WELCOME TO CONNECT FOUR - VERSUS MODE!!! **\n') Project2commonUI.delay_print( '**********************************************\n') time.sleep(1.5)
def WinningBanner(GameState, S1: str, S2: str) -> str: ''' Given the GameState and the names of the users, this function determines if there is a winner and prints a banner with the winner's name to end the program ''' if connectfour.winner(GameState) == 1: # If Red wins then the winning banner for red is printed! time.sleep(1) Project2commonUI.delay_print('\n**************************************\n') Project2commonUI.delay_print(' Player RED -- {} has won! :D \n'.format(S1)) Project2commonUI.delay_print('**************************************\n') time.sleep(2) return 'You may exit the program!' # Returns a string to indicate exiting the program elif connectfour.winner(GameState) == 2: time.sleep(1) Project2commonUI.delay_print('\n**************************************\n') # If Yellow wins then the winning banner for yellow is printed! Project2commonUI.delay_print(' Player YELLOW -- {} has won! :D \n'.format(S2)) Project2commonUI.delay_print('**************************************\n') # Returns a string to indicate exiting the program time.sleep(2) return 'You may exit the program!'
def WinningBanner(GameState, S1: str, S2: str) -> str: ''' Given the GameState and the names of the users, this function determines if there is a winner and prints a banner with the winner's name to end the program ''' if connectfour.winner( GameState ) == 1: # If Red wins then the winning banner for red is printed! time.sleep(1) Project2commonUI.delay_print( '\n**************************************\n') Project2commonUI.delay_print( ' Player RED -- {} has won! :D \n'.format(S1)) Project2commonUI.delay_print( '**************************************\n') time.sleep(2) return 'You may exit the program!' # Returns a string to indicate exiting the program elif connectfour.winner(GameState) == 2: time.sleep(1) Project2commonUI.delay_print( '\n**************************************\n' ) # If Yellow wins then the winning banner for yellow is printed! Project2commonUI.delay_print( ' Player YELLOW -- {} has won! :D \n'.format(S2)) Project2commonUI.delay_print( '**************************************\n' ) # Returns a string to indicate exiting the program time.sleep(2) return 'You may exit the program!'