Skip to content

Commit

Permalink
twinhook: minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Netdex committed May 30, 2019
1 parent 9985f51 commit a6ca760
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions twinhook/algo/th_algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
class th_player;

/**
* \brief An algorithm that uses game information to control the player
* (i.e. the bot's brain)
* \brief A player control algorithm, which determines an action to perform based on
* current game state.
*/
class th_algorithm
{
Expand All @@ -19,7 +19,6 @@ class th_algorithm
* \param player Pointer to player controller
*/
th_algorithm(th_player *player) : player(player) {}
virtual ~th_algorithm() {}

/**
* \brief Called when the algorithm is initialized by the player controller
Expand All @@ -34,6 +33,7 @@ class th_algorithm
* \param d3dDev Pointer to game's Direct3DDevice
*/
virtual void visualize(IDirect3DDevice9* d3dDev){}

/**
* \brief Handle input received from player for algorithm control
* \param diKeys Key hold state
Expand Down
2 changes: 1 addition & 1 deletion twinhook/algo/th_vo_algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static const BYTE CONTROL_KEYS[] = { DIK_UP, DIK_DOWN, DIK_LEFT, DIK_RIGHT, DIK_
*
* This algorithm implements near perfect deathbombing by detecting if it will collide
* with an obstacle very soon, and has no recourse for avoidance. However, this is
* dependant on the linear approximation and the accuracy of the collision predictors.
* dependent on the linear approximation and the accuracy of the collision predictors.
*
* High-Level Function:
* First we must calibrate the algorithm by determining the player velocity, by
Expand Down
5 changes: 0 additions & 5 deletions twinhook/util/vec2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ vec2 operator*(float o, const vec2& a)
return operator*(a, o);
}

vec2 operator/(float o, const vec2& a)
{
return operator/(a, o);
}

std::ostream& operator<<(std::ostream& stream, const vec2& a)
{
return stream << "<" << a.x << "," << a.y << ">";
Expand Down

0 comments on commit a6ca760

Please sign in to comment.