<commit_before>#include "TestRobot.h"
#include "TimeKeeper.h"
#include "Logger.h"

extern "C" {
    BZAdvancedRobot *create() { return new TestRobot(); }
    void destroy(BZAdvancedRobot *robot) { delete robot; }
}

void TestRobot::initialize()
{
    setCompatability(false);
}

void TestRobot::update()
{
    setFire();
    setAhead(20);
    do {
        if (getGunHeat() <= 0)
            setFire();
        execute();
    } while (getDistanceRemaining() > 0);

    setTurnLeft(90);
    do {
        execute();
    } while (getTurnRemaining() > 0);
}

void TestRobot::onHitWall(const HitWallEvent &/*hwe*/)
{
    FRONTENDLOGGER << "Got a hitWallEvent, stopping!" << std::endl;
    setAhead(0);
}
// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
// c-basic-offset: 2 ***
// indent-tabs-mode: t ***
// End: ***
// ex: shiftwidth=2 tabstop=8<commit_msg>ws, add missing license header<commit_after>/* bzflag
 * Copyright (c) 1993 - 2008 <NAME>
 *
 * This package is free software;  you can redistribute it and/or
 * modify it under the terms of the license found in the file
 * named COPYING that should have accompanied this file.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* interface header */
#include "TestRobot.h"

/* common implementation headers */
#include "TimeKeeper.h"

/* local implementation headers */
#include "Logger.h"


extern "C" {
  BZAdvancedRobot *create()
  {
    return new TestRobot();
  }
  void destroy(BZAdvancedRobot *robot)
  {
    delete robot;
  }
}

void TestRobot::initialize()
{
  setCompatability(false);
}

void TestRobot::update()
{
  setFire();
  setAhead(20);
  do {
    if (getGunHeat() <= 0)
      setFire();
    execute();
  } while (getDistanceRemaining() > 0);
  
  setTurnLeft(90);
  do {
    execute();
  } while (getTurnRemaining() > 0);
}

void TestRobot::onHitWall(const HitWallEvent &/*hwe*/)
{
  FRONTENDLOGGER << "Got a hitWallEvent, stopping!" << std::endl;
  setAhead(0);
}

// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
// c-basic-offset: 2 ***
// indent-tabs-mode: t ***
// End: ***
// ex: shiftwidth=2 tabstop=8
{'fraction_non_alphanumeric': 0.16084843128590368, 'fraction_numerical': 0.014140521431727796, 'mean_word_length': 3.353846153846154, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 8, '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': '6169849', 'n_tokens_mistral': 802, 'n_tokens_neox': 766, 'n_words': 205}