create Method getBoardTextView in SiedlerGame
This commit is contained in:
		
							parent
							
								
									0ea44905e2
								
							
						
					
					
						commit
						fc6eed48e8
					
				| 
						 | 
				
			
			@ -31,7 +31,7 @@ public class Siedler {
 | 
			
		|||
        boolean diceThrown = false;
 | 
			
		||||
        while (running) {
 | 
			
		||||
            Config.Faction currentPlayerFaction = game.getCurrentPlayerFaction();
 | 
			
		||||
            parser.displayGameboard(game.getBoard().getTextView());
 | 
			
		||||
            parser.displayGameboard(game.getBoardTextView());
 | 
			
		||||
            parser.playerTurn(currentPlayerFaction);
 | 
			
		||||
            if (!diceThrown) {
 | 
			
		||||
                throwDice(parser, game);
 | 
			
		||||
| 
						 | 
				
			
			@ -170,7 +170,7 @@ public class Siedler {
 | 
			
		|||
     * @param payout true (for second Settlement in founding Phase): the Player gets a payout for the settlement. false (for first Settlement in founding Phase): The Player gets no payout.
 | 
			
		||||
     */
 | 
			
		||||
    private static void buildStructuresInFoundingPhase(Parser parser, SiedlerGame game, Boolean payout) {
 | 
			
		||||
        parser.displayGameboard(game.getBoard().getTextView());
 | 
			
		||||
        parser.displayGameboard(game.getBoardTextView());
 | 
			
		||||
        parser.playerTurn(game.getCurrentPlayerFaction());
 | 
			
		||||
 | 
			
		||||
        //build Settlement
 | 
			
		||||
| 
						 | 
				
			
			@ -185,7 +185,7 @@ public class Siedler {
 | 
			
		|||
        } while (!successful);
 | 
			
		||||
 | 
			
		||||
        //build Road
 | 
			
		||||
        parser.displayGameboard(game.getBoard().getTextView());
 | 
			
		||||
        parser.displayGameboard(game.getBoardTextView());
 | 
			
		||||
        parser.giveCoordinatesForStructures(Config.Structure.ROAD);
 | 
			
		||||
        successful = false;
 | 
			
		||||
        do {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,7 +123,7 @@ public class SiedlerGame {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the game board.
 | 
			
		||||
     * Returns the game board. Used for test
 | 
			
		||||
     *
 | 
			
		||||
     * @return the game board
 | 
			
		||||
     */
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +131,13 @@ public class SiedlerGame {
 | 
			
		|||
        return board;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the String used to show the Board
 | 
			
		||||
     *
 | 
			
		||||
     * @return String of the Board.
 | 
			
		||||
     */
 | 
			
		||||
    public String getBoardTextView(){return board.toString();}
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the {@link Config.Faction} of the current player.
 | 
			
		||||
     *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue