<commit_before>#include <stdio.h>
#include "Player.h"

Player::Player(std::string path, SDL_Renderer* renderer,
               int16_t x, int16_t y) :
  Actor(path, renderer, x, y, 0, 0) {
}


void Player::HandleEvent(const SDL_Event& e) {
  if (e.type == SDL_KEYDOWN) {
    switch (e.key.keysym.sym) {
      case SDLK_UP: {
        set_y(get_y() - 1);
        break;
      }
      case SDLK_DOWN: {
        set_y(get_y() + 1);
        break;
      }
      case SDLK_RIGHT: {
        set_x(get_x() + 1);
        break;
      }
      case SDLK_LEFT: {
        set_x(get_x() - 1);
        break;
      }
    }
  }
}
<commit_msg>Player: controls changed to control velocity<commit_after>#include <stdio.h>
#include "Player.h"

Player::Player(std::string path, SDL_Renderer* renderer,
               int16_t x, int16_t y) :
  Actor(path, renderer, x, y, 0, 0) {
}


void Player::HandleEvent(const SDL_Event& e) {
  if (e.type == SDL_KEYDOWN) {
    switch (e.key.keysym.sym) {
      case SDLK_UP: {
        set_vy(get_vy() - 1);
        break;
      }
      case SDLK_DOWN: {
        set_vy(get_vy() + 1);
        break;
      }
      case SDLK_RIGHT: {
        set_vx(get_vx() + 1);
        break;
      }
      case SDLK_LEFT: {
        set_vx(get_vx() - 1);
        break;
      }
    }
  }
}

{'fraction_non_alphanumeric': 0.14329976762199845, 'fraction_numerical': 0.015491866769945779, 'mean_word_length': 1.8839285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6148438', 'n_tokens_mistral': 537, 'n_tokens_neox': 496, 'n_words': 99}