megamek.client.commands
Class ClientCommand

java.lang.Object
  extended by megamek.client.commands.ClientCommand
Direct Known Subclasses:
AddBotCommand, DeployCommand, FireCommand, HelpCommand, MoveCommand, RulerCommand, ShowEntityCommand, ShowTileCommand

public abstract class ClientCommand
extends java.lang.Object

Author:
dirk

Field Summary
protected  Client client
           
 
Constructor Summary
ClientCommand(Client client, java.lang.String name, java.lang.String helpText)
          Creates new ServerCommand
 
Method Summary
static java.lang.String getDirection(int arg)
           
static int getDirection(java.lang.String arg)
           
 java.lang.String getHelp()
          Returns some help text for this command
 java.lang.String getName()
          Return the string trigger for this command
abstract  java.lang.String run(java.lang.String[] args)
          Run this command with the arguments supplied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected Client client
Constructor Detail

ClientCommand

public ClientCommand(Client client,
                     java.lang.String name,
                     java.lang.String helpText)
Creates new ServerCommand

Method Detail

getName

public java.lang.String getName()
Return the string trigger for this command


getHelp

public java.lang.String getHelp()
Returns some help text for this command


run

public abstract java.lang.String run(java.lang.String[] args)
Run this command with the arguments supplied


getDirection

public static int getDirection(java.lang.String arg)

getDirection

public static java.lang.String getDirection(int arg)