private final void drawSprite(Graphics g,Sprite sprite){
  Rectangle view=g.getClipBounds();
  Rectangle spriteBounds=sprite.getBounds();
  if (view.intersects(spriteBounds) && !sprite.isHidden()) {
    if (!sprite.isReady()) {
      sprite.prepare();
    }
    sprite.drawOnto(g,spriteBounds.x,spriteBounds.y,this);
  }
}

private final void drawSprite ( Graphics g , Sprite sprite ) { Rectangle view = g . getClipBounds ( ) ; Rectangle spriteBounds = sprite . getBounds ( ) ; if ( view . intersects ( spriteBounds ) && ! sprite . isHidden ( ) ) { if ( ! sprite . isReady ( ) ) { sprite . prepare ( ) ; } sprite . drawOnto ( g , spriteBounds . x , spriteBounds . y , this ) ; } }
draws a sprite , if it is in the current view
