コード例 #1
0
    def test_not_ni(self):
        '''Test !Ni'''
        planet = Planet()
        for pop in '789A':
            planet.population = ehex(pop)
            planet._determine_trade_codes()

            self.assertFalse('Ni' in planet.trade_codes)
コード例 #2
0
    def test_ni(self):
        '''Test Ni'''
        planet = Planet()
        for pop in '0123456':
            planet.population = ehex(pop)
            planet._determine_trade_codes()

            self.assertTrue('Ni' in planet.trade_codes)
コード例 #3
0
    def test_not_in(self):
        '''Test !In'''
        planet = Planet()
        for atm in '3568ABC':
            for pop in '012345678':
                planet.atmosphere = ehex(atm)
                planet.population = ehex(pop)
                planet._determine_trade_codes()

                self.assertFalse('In' in planet.trade_codes)
コード例 #4
0
    def test_in(self):
        '''Test In'''
        planet = Planet()
        for atm in '012479':
            for pop in '9A':
                planet.atmosphere = ehex(atm)
                planet.population = ehex(pop)
                planet._determine_trade_codes()

                self.assertTrue('In' in planet.trade_codes)
コード例 #5
0
    def test_not_ag(self):
        '''Test !Ag'''
        planet = Planet()
        for atm in '0123ABC':
            for hyd in '01239A':
                for pop in '0123489A':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertFalse('Ag' in planet.trade_codes)
コード例 #6
0
    def test_ag(self):
        '''Test Ag'''
        planet = Planet()
        for atm in '456789':
            for hyd in '45678':
                for pop in '567':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Ag' in planet.trade_codes)
コード例 #7
0
    def test_not_ri(self):
        '''Test !Ri'''
        planet = Planet()
        for gov in '0123ABC':
            for atm in '01234579ABC':
                for pop in '0123459A':
                    planet.government = ehex(gov)
                    planet.atmosphere = ehex(atm)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertFalse('Ri' in planet.trade_codes)
コード例 #8
0
    def test_ri(self):
        '''Test Ri'''
        planet = Planet()
        for gov in '456789':
            for atm in '68':
                for pop in '678':
                    planet.government = ehex(gov)
                    planet.atmosphere = ehex(atm)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Ri' in planet.trade_codes)
コード例 #9
0
    def test_na(self):
        '''Test Na'''
        planet = Planet()
        for atm in '0123':
            for hyd in '0123':
                for pop in '6789':
                    planet.atmosphere = ehex(atm)
                    planet.hydrographics = ehex(hyd)
                    planet.population = ehex(pop)
                    planet._determine_trade_codes()

                    self.assertTrue('Na' in planet.trade_codes)