1
0
Fork 0

Small renaming

This commit is contained in:
Michaël Lemaire 2015-03-12 01:00:00 +01:00
parent 5cffb1680c
commit 98733dc94b
3 changed files with 23 additions and 6 deletions

View file

@ -5,12 +5,12 @@ module SpaceTac.Game.AI {
// Combination of a move action and a fire action
export class BullyManeuver {
// Move action to position the ship before firing
move: AIManeuver;
move: Maneuver;
// Fire action
fire: AIManeuver;
fire: Maneuver;
constructor(move: AIManeuver = null, fire: AIManeuver = null) {
constructor(move: Maneuver = null, fire: Maneuver = null) {
this.move = move;
this.fire = fire;
}
@ -123,9 +123,9 @@ module SpaceTac.Game.AI {
} else {
var result = new BullyManeuver();
if (move) {
result.move = new AIManeuver(this.ship, engine, move);
result.move = new Maneuver(this.ship, engine, move);
}
result.fire = new AIManeuver(this.ship, weapon, target);
result.fire = new Maneuver(this.ship, weapon, target);
return result;
}
}

View file

@ -3,7 +3,7 @@ module SpaceTac.Game.AI {
// Ship maneuver for an artifical intelligence
// A maneuver is like a human player action, choosing an equipment and using it
export class AIManeuver {
export class Maneuver {
// Concerned ship
ship: Ship;

View file

@ -0,0 +1,17 @@
module SpaceTac.Game.AI {
"use strict";
// A chain of Maneuver to execute sequentially
export class ManeuverChain {
// Concerned ship
ship: Ship;
// Sequence of maneuvers
maneuvers: Maneuver[];
constructor(ship: Ship, maneuvers: Maneuver[]) {
this.ship = ship;
this.maneuvers = maneuvers;
}
}
}