Exemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        super(TestLogin, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_RUN,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            world=world.World(asteroids=world.Asteroids(asteroids=[
                world.Asteroid(position=world.Position(x=10000, y=10000),
                               radius=200,
                               composition={
                                   ResourceType.e_ICE: 20,
                                   ResourceType.e_SILICATES: 20,
                                   ResourceType.e_METALS: 20
                               })
            ])),
            players={
                'spy007':
                world.Player(login="******",
                             password="******",
                             ships=[
                                 default_ships.make_probe(
                                     name="scout-1",
                                     position=world.Position(100, 200))
                             ])
            })
Exemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        super(TestNavigation, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_RUN,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            world=world.World(),
            players={
                'spy007': world.Player(
                    login="******",
                    password="******",
                    ships=[
                        default_ships.make_probe(
                            name="scout-1",
                            position=world.Position(
                                x=100, y=200, velocity=world.Vector(100, -100))),
                        default_ships.make_probe(
                            name="scout-2",
                            position=world.Position(
                                x=-100, y=-200, velocity=world.Vector(-10, 20)))
                    ]
                )
            }
        )
    def __init__(self, *args, **kwargs):
        super(TestCase, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_FREEZE,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            players={
                'oreman':
                world.Player(login="******",
                             password="******",
                             ships=[
                                 default_ships.make_miner(
                                     name="miner-1",
                                     position=world.Position(
                                         x=0, y=0, velocity=world.Vector(0,
                                                                         0))),
                             ])
            },
            world=world.World(asteroids=world.Asteroids(asteroids=[
                world.Asteroid(position=world.Position(x=10000, y=10000),
                               radius=200,
                               composition={
                                   world.ResourceType.e_ICE: 20,
                                   world.ResourceType.e_SILICATES: 20,
                                   world.ResourceType.e_METALS: 20
                               })
            ])),
        )
Exemplo n.º 4
0
    def __init__(self, *args, **kwargs):
        super(TestCase, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_FREEZE,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            players={
                'player':
                world.Player(login="******",
                             password="******",
                             ships=[
                                 default_ships.make_station(
                                     name="SweetHome",
                                     position=world.Position(
                                         x=0, y=0, velocity=world.Vector(0,
                                                                         0)),
                                     warehouse=ResourceContainerState({
                                         ResourceType.e_METALS:
                                         200000,
                                         ResourceType.e_SILICATES:
                                         40000,
                                     }),
                                 ),
                             ])
            },
            world=world.World(),
        )
Exemplo n.º 5
0
    def __init__(self, *args, **kwargs):
        super(TestCase, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_RUN,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            world=world.World(),
            players={
                'player':
                world.Player(login="******",
                             password="******",
                             ships=[
                                 default_ships.make_miner(
                                     name="miner-1",
                                     position=world.Position(
                                         x=0, y=0, velocity=world.Vector(0,
                                                                         0)),
                                     cargo=ResourceContainerState(
                                         content={
                                             ResourceType.e_SILICATES: 20000,
                                             ResourceType.e_METALS: 50000,
                                             ResourceType.e_ICE: 15000,
                                         })),
                                 default_ships.make_miner(
                                     name="miner-2",
                                     position=world.Position(
                                         x=10,
                                         y=10,
                                         velocity=world.Vector(0, 0)),
                                     cargo=ResourceContainerState(
                                         content={
                                             ResourceType.e_SILICATES: 5000,
                                             ResourceType.e_METALS: 5000,
                                             ResourceType.e_ICE: 10000,
                                         })),
                             ])
            },
        )
Exemplo n.º 6
0
    def __init__(self, *args, **kwargs):
        super(TestCase, self).__init__(*args, **kwargs)

        self.configuration = Configuration(
            general=General(total_threads=1,
                            login_udp_port=7456,
                            initial_state=ApplicationMode.e_FREEZE,
                            ports_pool=(12000, 12100)),
            blueprints=blueprints.DefaultBlueprints(),
            players={
                'player':
                world.Player(login="******",
                             password="******",
                             ships=[
                                 default_ships.make_miner(
                                     name="miner",
                                     position=world.Position(
                                         x=0, y=0, velocity=world.Vector(0,
                                                                         0))),
                             ])
            },
            world=world.World(),
        )