<commit_before>part of libgame;

// convenience wrapper class.
class Actor {

  Actor(this.entity);
  Entity entity;

  PositionComponent get position => entity.getComponentByClass(PositionComponent);
  VelocityComponent get velocity => entity.getComponentByClass(VelocityComponent);
  AccelerationComponent get acceleration => entity.getComponentByClass(AccelerationComponent);
  ForceComponent get force => entity.getComponentByClass(ForceComponent);
  MassComponent get mass => entity.getComponentByClass(MassComponent);
  SpriteComponent get sprite => entity.getComponentByClass(SpriteComponent);
}<commit_msg>Allow checking actors for particular tags<commit_after>part of libgame;

// convenience wrapper class.
class Actor {

  Actor(this.entity);
  Entity entity;


  bool hasTag(String tag) {
    MetaComponent meta = entity.getComponentByClass(MetaComponent);
    return meta.meta['tags'].contains(tag);
  }

  PositionComponent get position => entity.getComponentByClass(PositionComponent);
  VelocityComponent get velocity => entity.getComponentByClass(VelocityComponent);
  AccelerationComponent get acceleration => entity.getComponentByClass(AccelerationComponent);
  ForceComponent get force => entity.getComponentByClass(ForceComponent);
  MassComponent get mass => entity.getComponentByClass(MassComponent);
  SpriteComponent get sprite => entity.getComponentByClass(SpriteComponent);
}
{'fraction_non_alphanumeric': 0.08416547788873038, 'fraction_numerical': 0.0, 'mean_word_length': 6.882022471910112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7355709', 'n_tokens_mistral': 358, 'n_tokens_neox': 340, 'n_words': 83}