![]() #Checks for 'empty slot' from bottom up and fills it with players 'chip' One_choice = int(raw_input('Column: ')) #Determines what column player will drop chip Choose a column to drop your chip' % (player_one) If turn % 2 = 0: #Determines whose turn it is by checking for even or odd turn Print 'Player 1 is Red(R) and Player 2 is Black(B)' board = #List for holding the boardīoard.append( * 7) #builds 7 x 6 board (rows x columns) I was thinking about setting a variable 'winner' to False and doing the loop 'while winner = False:' and have the win condition set this variable to True. Quick note, the current while loop is simply for debugging. I'd prefer some guidance as opposed to straight code for the sake of learning, but of course, any help would be greatly appreciated. Now I need a win condition, though honestly, I don't know where to start. I've got this connect four game together and it works in so far as switching between players and 'dropping' their respective pieces. I'm still pretty green working with python but I figured making my own game from scratch with what I know would be good practice. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |