losaflicks.blogg.se

How do i make my c++ tic tac toe game into a .exe file
How do i make my c++ tic tac toe game into a .exe file






how do i make my c++ tic tac toe game into a .exe file

'X' Enter a value from the grid to plot your move: quit 'X' Enter a value from the grid to plot your move: leave Here's a section of my game: 'X' Enter a value from the grid to plot your move: exit If winner(player_list,'player',1) = True:

how do i make my c++ tic tac toe game into a .exe file

Print "Enter an available number that's between 1-9" If players_move in pos_list or players_move 9: Players_move = int(raw_input("\n\'%s\' Enter a value from the grid to plot your move: " %each)) If winner(computer_list,'Computer',2) = True: If winner(player_list,'player',2) = True or winner(computer_list,'Computer',2) = True: If computer_AI_part(computer_list) or computer_AI_part(player_list) = 1: Replay,computer_move,players_move,loop_count,pos_list,player_list,computer_list = 0,0,0,0, Print "\nTic Tac Toe - Computer vs You", '\n'*2,"Computer goes first\n" Restart = raw_input("Would you like to replay?: ") Global computer_move,pos_list,player_list,computer_list # Chceks all possible values which the player can and enter to win and blocks it # If prevents the A.I part from printing the statemnt (4 in x and 5 in x and 6 in x)or(7 in x and 8 in x and 9 in x)or(1 in x and 5 in x and 9 in x)or(3 in x and 5 in x and 7 in x)): If ((1 in x and 4 in x and 7 in x)or(1 in x and 2 in x and 3 in x)or(2 in x and 5 in x and 8 in x)or(3 in x and 6 in x and 9 in x)or # Checks if there is a winner (Really messy, could do with code simplifying) # Only prints one the player has made a move # Grid on which the player and computer play on I am looking on how I can improve my writing style and/or how to simplify how I write my code.








How do i make my c++ tic tac toe game into a .exe file