From 820e9d70d995516afae3fd36db4435df930a7d2a Mon Sep 17 00:00:00 2001 From: Joseph Walton-Rivers <jwalto@essex.ac.uk> Date: Thu, 11 Jun 2015 14:04:44 +0100 Subject: [PATCH] comments on how actions work --- src/asteroids/Action.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/asteroids/Action.java b/src/asteroids/Action.java index db30590..09dd18f 100644 --- a/src/asteroids/Action.java +++ b/src/asteroids/Action.java @@ -13,12 +13,24 @@ public class 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) { this.thrust = thrust; this.turn = turn; this.shoot = shoot; } + /** + * Create an action which is a copy of an existing action + * + * @param a the action to clone + */ public Action(Action a) { thrust = a.thrust; turn = a.turn; -- GitLab