text: #ifndef SFASSET_H
  #define SFASSET_H
  
  #include <string>
  #include <memory>
  #include <iostream>
  
  #include <SDL2/SDL.h>
  #include <SDL2/SDL_image.h>
  
  using namespace std;
  
  #include "SFCommon.h"
  #include "SFEvent.h"
  #include "SFWindow.h"
  #include "SFBoundingBox.h"
  
  /**
   * We could create SFPlayer, SFProjectile and SFAsset which are subclasses
   * of SFAsset.  However, I've made an implementation decision to use this
   * enum to mark the type of the SFAsset.  If we add more asset types then
   * the subclassing strategy becomes a better option.
   */
  enum SFASSETTYPE {
  	SFASSET_DEAD,
  	SFASSET_PLAYER,
  	SFASSET_PROJECTILE,
  	SFASSET_ALIEN,
  	SFASSET_COIN,
  	SFASSET_WALL,
  	SFASSET_STAR,
  };
  
  class SFAsset {
  public:
  	SFAsset(const SFASSETTYPE, const std::shared_ptr<SFWindow>);
  	SFAsset(const SFAsset&);
  	virtual ~SFAsset();
  
  	virtual void SetPosition(Point2 &);
  	virtual Point2 GetPosition();
  	virtual SFAssetId GetId();
  	virtual void OnRender();
  	virtual void GoEast();
  	virtual void GoWest();
  	virtual void GoNorth(); //missiles
  	virtual void GoUp(); //player
  	virtual void GoSouth();
  	virtual void SetNotAlive();
  	virtual bool IsAlive();
  	virtual void HandleCollision();
  	virtual void HandleCollisionObject();
  	virtual void Pattern();
  
  	virtual bool CollidesWith(shared_ptr<SFAsset>);
  	virtual shared_ptr<SFBoundingBox> GetBoundingBox();
  
  	int direction = 0;
  
  private:
  	// it would be nice if we could make this into a smart pointer,
  	// but, because we need to call SDL_FreeSurface on it, we can't.
  	// (or we could use a std::shared_ptr with a custom Deleter, but
  	// that's a little too much right now)
  	SDL_Texture * sprite;
  	shared_ptr<SFBoundingBox> bbox;
  	SFASSETTYPE type;
  	SFAssetId id;
  	std::shared_ptr<SFWindow> sf_window;
  
  	static int SFASSETID;
  
  	bool checkCollideNorth = false;
  	bool checkCollideSouth = false;
  	bool checkCollideWest = false;
  	bool checkCollideEast = false;
  
  	bool changeDirection = false;
  };
  
  #endif
  