Monday, June 28, 2010

Dear Wimbledon

If you watched the Isner-Mahut match, you'll know that the scoreboard malfunctioned late in the fifth set. That doesn't make sense, so I'll offer some pseudocode for the new upgrade that might come up.

set = [0,0] //Set won by each player

games_won = [0,0] //Games won for the current set

current_set = 1 //which set we're tracking

updateNumber() //assuming there's a function for updating the number with
//syntax as (player number, set) and adds one to the game

while (set[0] != 3 || set[1] != 3):
while abs(games_won[0] - games_won[1]) < 1 :
temp = int(input("who won the game?")) //assuming the referee inputs stuff corectly
updateNumber(temp, current_set)
set[temp] += 1
current_set += 1

print "Player " temp+1 " is the winner!"

You're welcome Wimbledon.

(... hmm there might be a bug in there somewhere....)


Got comments? Post them below!

No comments:

Post a Comment