mirror of
https://github.com/ApfelTeeSaft/PlanetFleet.git
synced 2026-08-26 19:33:38 +00:00
refactored console
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef ABSTRACT_COMMAND_H
|
||||
#define ABSTRACT_COMMAND_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace battleship{
|
||||
class AbstractCommand{
|
||||
protected:
|
||||
AbstractCommand(std::string str) : cmdStr(str){}
|
||||
virtual void execute(){}
|
||||
virtual void validate(){}
|
||||
virtual void handle();
|
||||
|
||||
std::string cmdStr;
|
||||
std::vector<std::string> arguments;
|
||||
private:
|
||||
std::vector<std::string> explodeString(std::string);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user