Commit 3a531eb8 authored by niklas.mueller01's avatar niklas.mueller01
Browse files

init ageoftowers - executable main class

parent c5551b26
package towerwarspp.main;
import towerwarspp.preset.ArgumentParser;
import towerwarspp.preset.ArgumentParserException;
* Class {@link ageoftowers} initializing a new game of TowerWarsPP with given settings <br>
* from the commandline using the ArgumentParser.
* @version 0.1 20th June 2017
* @author Niklas Mueller
public class ageoftowers {
* Constructor to initialize a new game
* @param args list with settings to put into the ArgumentParser
public ageoftowers(String[] args) {
try {
ArgumentParser ap = new ArgumentParser(args);
System.out.println("local: " + ap.isLocal());
System.out.println("network: " + ap.isNetwork());
System.out.println("size: " + ap.getSize());
//System.out.println("graphic: " + ap.isGraphic());
switch (ap.getRed()) {
case HUMAN:
System.out.println("Red chose human player");
System.out.println("Red chose random player");
//switch (ap.getBlue()) {}
catch (ArgumentParserException e) {
/*initialize two player-objects with given settings from interface towerwarspp.preset.Player;
both players are using the same object from a class implementing Requestable-Interface
request alternately moves from both players, check validity and inform other player
do move on board
output current gamestatus (graphic/textual)
tell output if move is leading to end the game
possibility to play with a network player
public static void main(String[] args) {
ageoftowers game = new ageoftowers(args);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment