Delected CommandWords.java
added quit Method in Parser Fixed minor grammar mistakes in Siedler Game
This commit is contained in:
		
							parent
							
								
									57649df6ba
								
							
						
					
					
						commit
						ff734bce23
					
				| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
package ch.zhaw.catan;
 | 
			
		||||
 | 
			
		||||
public class CommandWords {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -25,8 +25,9 @@ public class Parser {
 | 
			
		|||
        textTerminal.println(gameboard);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void displayPlayerResourceStock(HashMap<Config.Resource, Integer> currentPlayerResource){
 | 
			
		||||
        textTerminal.println("You own the follwing Resources");
 | 
			
		||||
    public void displayPlayerInfo(HashMap<Config.Resource, Integer> currentPlayerResource, int winpoints){
 | 
			
		||||
        textTerminal.println("You are currently holding" + winpoints + " winpoints.");
 | 
			
		||||
        textTerminal.println("You own the follwing resources:");
 | 
			
		||||
        for(Config.Resource resource : currentPlayerResource.keySet()){
 | 
			
		||||
            textTerminal.println(resource.name() + ":" + currentPlayerResource.get(resource));
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -66,6 +67,11 @@ public class Parser {
 | 
			
		|||
        return textIO.newEnumInputReader(Command.class).read("What would you like to do?");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * @param give if true ask for resource to give if false for resource to receive
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    public Config.Resource trade(boolean give) {
 | 
			
		||||
        String output = "give";
 | 
			
		||||
        if (!give){
 | 
			
		||||
| 
						 | 
				
			
			@ -73,5 +79,10 @@ public class Parser {
 | 
			
		|||
        }
 | 
			
		||||
        return textIO.newEnumInputReader(Config.Resource.class).read("Which Resource would you like to " + output );
 | 
			
		||||
    }
 | 
			
		||||
    public void quit(){
 | 
			
		||||
        textTerminal.dispose();
 | 
			
		||||
        textIO.dispose();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ public class SiedlerGame {
 | 
			
		|||
        return allPlayers.get(activePlayer).getSpecificResource(resource);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public HashMap<Resource, Integer> getCurruntPlayerResource() {
 | 
			
		||||
    public HashMap<Resource, Integer> getCurrentPlayerResource() {
 | 
			
		||||
        return allPlayers.get(activePlayer).getResources();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue