In my M.U.G.E.N tournament program, I want to process the match results from the log file, that is created by the game. The log looks like this:
[Match 1]
totalmatches = 1
team1.1 =
team2.1 =
stage = stages/kowloon.def
[Match 1 Round 1]
winningteam = 1
timeleft = -1.00
p1.name = Knuckles the Echidna
p1.life = 269
p1.power = 0
p2.name = Shadow the Hedgehog
p2.life = 0
p2.power = 2684
[Match 1 Round 2]
winningteam = 2
timeleft = -1.00
p1.name = Knuckles the Echidna
p1.life = 0
p1.power = 1510
p2.name = Shadow the Hedgehog
p2.life = 586
p2.power = 2967
[Match 1 Round 3]
winningteam = 2
timeleft = -1.00
p1.name = Knuckles the Echidna
p1.life = 0
p1.power = 3000
p2.name = Shadow the Hedgehog
p2.life = 789
p2.power = 777
What I want is to process the last winningteam
property to determine the result of the match. What is the most effective way to achieve this? (maybe with LINQ)