Beispiel #1
0
# Copyright 2012 Andreev Alexander <*****@*****.**>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from socket import *
from argparse import ArgumentParser
from bowman.utils import Connection
import sys, os
from bowman.lib import colorama


colorama.init(autoreset=True)
UNIT_TYPES_SYMBOLS = ["r", "k", "h", "w", "s", "a", "dm", "lm", "dr"]

class Client():
    def __init__(self, remote_ip, remote_port):
        self.remote_ip = remote_ip
        self.remote_port = remote_port
        self.connect()
        self.world_info = None
        self.unit_type = self.choice_unit_type()
        self.tr_nums = None
        self.tb_nums = None
        self.team = None
        self.main()

    def clear_screen(self):
        if sys.platform == "win32":
            os.system("cls")
        else:
Beispiel #2
0
# Copyright 2012 Andreev Alexander <*****@*****.**>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from socket import socket
from argparse import ArgumentParser
from bowman.utils import Connection
import sys
import os
from bowman.lib import colorama


colorama.init()
UNIT_TYPES_SYMBOLS = ["r", "k", "h", "w", "s", "a", "dm", "lm", "dr"]
CHOICE_UNIT_TYPE_PROMT = "Enter unit type, which you prefer: "
COLORED_OUTPUT = True


class Client():
    def __init__(self, remote_ip, remote_port):
        '''
        Constructor for class Client.
        It takes destination host and port and connect to it.
        '''
        self.remote_ip = remote_ip
        self.remote_port = remote_port
        self._connect()
        self.world_info = None
        self.unit_type = self.choice_unit_type()
        self.tr_nums = None