Skip to content
Snippets Groups Projects
Commit 820e9d70 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

comments on how actions work

parent 49a03b8f
No related branches found
No related tags found
No related merge requests found
...@@ -13,12 +13,24 @@ public class Action { ...@@ -13,12 +13,24 @@ public class Action {
public Action() {} public Action() {}
/**
* Create a new action to be executed by the controller
*
* @param thrust 1 is full thrust, 0 is nothing
* @param turn 1 is clockwise, -1 is anticlockwise, 0 is don't turn
* @param shoot true is fire, false is don't fire
*/
public Action(double thrust, double turn, boolean shoot) { public Action(double thrust, double turn, boolean shoot) {
this.thrust = thrust; this.thrust = thrust;
this.turn = turn; this.turn = turn;
this.shoot = shoot; this.shoot = shoot;
} }
/**
* Create an action which is a copy of an existing action
*
* @param a the action to clone
*/
public Action(Action a) { public Action(Action a) {
thrust = a.thrust; thrust = a.thrust;
turn = a.turn; turn = a.turn;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment