Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
help extract team scores info from frostbite data obtain from game events

usage :
    teamScores = TeamScoresBlock([2, 130, 245, 1000])
    print "num of teams : %s" % len(teamScores)
    print "first team's score : %s" % teamScores[0]
    print "second team's : %s" % teamScores[1]
    print "the first 2 teams' scores : %s" % teamScores[0:2]
    print "target score : %s " % teamScores.get_target_score()
    for p in teamScores:(more...)

src/b/3/b3-1.9.2/tests/parsers/frostbite2/test_util.py   b3(Download)
 
import unittest2 as unittest
from b3.parsers.frostbite2.util import BanlistContent, BanlistContentError, PlayerInfoBlock, TeamScoresBlock, MapListBlock, MapListBlockError
 
 
    def test_1(self):
        bloc = TeamScoresBlock(['2','15','48','2500'])
        self.assertEqual(2, len(bloc))
        self.assertEqual(15, bloc[0])
        self.assertEqual(48, bloc[1])

src/b/i/big-brother-bot-HEAD/tests/parsers/frostbite2/test_util.py   big-brother-bot(Download)
 
import unittest2 as unittest
from b3.parsers.frostbite2.util import BanlistContent, BanlistContentError, PlayerInfoBlock, TeamScoresBlock, MapListBlock, MapListBlockError
 
 
    def test_1(self):
        bloc = TeamScoresBlock(['2','15','48','2500'])
        self.assertEqual(2, len(bloc))
        self.assertEqual(15, bloc[0])
        self.assertEqual(48, bloc[1])