text: #ifndef __PLAYER_AGENT__H
  #define __PLAYER_AGENT__H 
  
  #include "enviro.h"
  #include "styles.h"
  
  using namespace enviro;
  
  //player: user can munipulate the car and shoot virus
  class PlayerController : public Process, public AgentInterface {
  
      public:
      PlayerController() : Process(), AgentInterface(), v(0), omega(0), firing(false) {}
  
      void init() {
          //watch key down movement
          watch("keydown", [&](Event &e) {
              auto k = e.value()["key"].get<std::string>();
              if ( k == " " && !firing ) {
                    Agent& bullet = add_agent("Bullet", 
                      x() + 17*cos(angle()), 
                      y() + 17*sin(angle()), 
                      angle(), 
                      BULLET_STYLE);    
                      bullet.apply_force(100,0);
                    firing = true;
              } else if ( k == "w" ) {
                    v = v_m;              
              } else if ( k == "s" ) {
                    v = -v_m;  
              } else if ( k == "a" ) {
                    omega = -omega_m;
              } else if ( k == "d" ) {
                    omega = omega_m;
              } 
          });        
          //watch key up movement
          watch("keyup", [&](Event &e) {
              auto k = e.value()["key"].get<std::string>();
              if ( k == " " ) {
                  firing = false;
              } else if ( k == "w" || k == "s" ) {
                    v = 0;               
              } else if ( k == "a" ) {
                    omega = 0;
              } else if ( k == "d" ) {
                    omega = 0;
              } 
          });
          // center(x(), y());
          zoom(1.5);
      }
      void start() { }
      void update() {
          //set velocity and angle strength to player
          track_velocity(v,omega,10,400);
          // center(x(), y());
      }
      void stop() {}
  
      double v, omega;
      double const v_m = 30, omega_m = 1;
      bool firing;
  
  };
  
  class Player : public Agent {
      public:
      Player(json spec, World& world) : Agent(spec, world) {
          add_process(c);
      }
      private:
      PlayerController c;
  };
  
  DECLARE_INTERFACE(Player)
  
  #endif