round1
player1 vs player3
player2 vs player4
round2
player1 vs player2
player3 vs player4
round3
player1 vs player4
player2 vs player3
So i know how to work out the amount of rounds and amount of matches like this:
teams = open('teamlist.txt', 'r')
teams = teams.read()
teams = teams.strip()
ghostPlayer = False
teamCounter = 0
for line in teams.split("\n"):
teamCounter += 1
if teamCounter % 2 == 1:
ghostPlayer = True
teamCounter += 1
print "odd"
else:
print "even"
if ghostPlayer == False:
print "GhostPlayer = %s, there is %s players" % (ghostPlayer, teamCounter)
else:
print "There is one GostPlayer(%s) and %s real players" % (gostPlayer, (teamCounter - 1))
rounds = teamCounter - 1
matches = teamCounter / 2
My problem really is that i don't know how to do the actual fixture bit, it would be very much appreciated if someone can help me

New Topic/Question
Reply



MultiQuote




|