Created
June 5, 2011 22:57
-
-
Save amanahuja/1009516 to your computer and use it in GitHub Desktop.
Algorithm for always playing in Column Four
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# This function calculates my bot's move in connect four algorithm | |
# returned mymove indicates what column to play on | |
# passed variable opponentmove should be the column the opponent just play on | |
# | |
# www.code-wars.com | |
def calculate_my_move (opponentmove): | |
if opponentmove = anything_at_all: | |
mymove = 4 | |
return mymove | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment