public void draw(){
		
		
		
		//ӵ
		if( tanks!=null ){
			gBuffer.setFont(new Font("", Font.BOLD, 30));
			gBuffer.setColor(Color.WHITE);
			gBuffer.drawString("Round "+tanks.get(0).getRoundNum(), 10, 75);
			for(Tank tank:tanks){
				
				if( tank.getType()==Tank.BLACK_TANK ){
					//ﻭɫ̹˵ӵ***************************************
					for(Bullet b:tank.getBullets()){
						if( b.isAlive() ){
							gBuffer.drawImage(BlackBullet, b.getX(), b.getY(), null);
						}
					}
				}
				else if( tank.getType()==Tank.OZ_TANK ){
					for(Bullet b:tank.getBullets()){
						if( b.isAlive() ){
							gBuffer.drawImage(BlackBullet, b.getX(), b.getY(), null);
						}
					}
				}
				else if( tank.getId()==id ){
					for(Bullet b:tank.getBullets()){
						if( b.isAlive() ){
							gBuffer.drawImage(MyBullet, b.getX(), b.getY(), null);
						}
					}
				}
				else{
					for(Bullet b:tank.getBullets()){
						if( b.isAlive() ){
							gBuffer.drawImage(EnemyBullet, b.getX(), b.getY(), null);
						}
					}
				}
				
			}
			//̹
			for(Tank tank:tanks){
				if( tank.isAlive() ){
					if( tank.getType()==Tank.OZ_TANK ){
						//ר̹
						drawTank(OzTank_Up, OzTank_Down, OzTank_Left, OzTank_Right, tank);
					}
					else if( tank.getType()==Tank.BLACK_TANK ){
						//ﻭɫ̹****************************************
						drawTank(BlackTank_Up, BlackTank_Down, BlackTank_Left, BlackTank_Right, tank);
					}
				    else if( tank.getId()==id ){
						//ݷӦͼƬ  
						drawTank(MyTank_Up, MyTank_Down, MyTank_Left, MyTank_Right, tank);
					}
					else{
						//ݷӦͼƬ 
						drawTank(EnemyTank_Up, EnemyTank_Down, EnemyTank_Left, EnemyTank_Right, tank);
					}
				    
				  //˿ͻ˳رӲ˳
					if(tank.getId()==id && tank.getClientMessage()==Tank.M_EXIT_PERMIT ){
//						try {
//							oos.close();
//							ois.close();
//							socket.close();
							System.exit(0);
							System.out.println("˳ˣ");
//						} catch (IOException e) {
//							e.printStackTrace();
//						}
					}
				}
				else{
					final int dX=7,dY=7;
					
					if( !tank.isDeadFinish() ){
						gBuffer.setColor(new Color(50,205,50));
						gBuffer.fillOval(tank.getCx(), tank.getCy(), tank.getCwidth(), tank.getCheight());
						gBuffer.setColor(new Color(255,242,0));
						gBuffer.fillOval(tank.getCx()+dX, tank.getCy()+dY, tank.getCwidth()-2*dX, tank.getCheight()-2*dY);
					}
				}
			}
		}
		
	}