public Client(String ip,String playerName,String tankName,int tankSpeed,int bulletSpeed,int bulletDamage){
		Client.ip = ip;
		
		
		
		imageInit();
		
		this.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
		Dimension scrSize=Toolkit.getDefaultToolkit().getScreenSize(); 
		this.setLocation(scrSize.width/2-SCREEN_WIDTH/2, scrSize.height/2-SCREEN_HEIGHT/2);
		this.setResizable(false);
		this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
		this.addKeyListener(this);
		this.addWindowListener(this);
		
		this.setVisible(true);
		
		try {
			socket = new Socket(ip, SERVER_PORT);
//			ois = new ObjectInputStream(socket.getInputStream());
//			oos = new ObjectOutputStream(socket.getOutputStream());
			in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
			out = new PrintWriter(socket.getOutputStream());
			
			id = Integer.parseInt(in.readLine());
			System.out.println("ӷյid="+id);
			this.setTitle("[´]̹˴սͻ ["+id+"]");
			//̹˳ʼ
			clientTank = new Tank(randomPoint(), id,playerName);
			
			if( tankName.trim().equals("OZTANK") ){
				clientTank.setType(Tank.OZ_TANK);
			}
			this.tankSpeed = tankSpeed;
			this.bulletSpeed = bulletSpeed;
			this.bulletDamage = bulletDamage;
			
			System.out.println(clientTank);
		} catch (UnknownHostException e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, "޷ӷȷǽѹرգ");
			System.exit(0);
			System.out.println("ӳ1");
		} catch (IOException e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, "޷ӷȷǽѹرգ");
			System.exit(0);
			System.out.println("ӳ2");
		} catch (NumberFormatException e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, "޷ӷȷǽѹرգ");
			System.exit(0);
			System.out.println("ӳ3");
		} 
		
	}