Minor Grammar and Cameltow fixes

This commit is contained in:
Leonardo Brandenberger
2021-12-09 16:11:17 +01:00
parent 1bbb05ebfd
commit 78ce0e43bc
9 changed files with 64 additions and 63 deletions
+11 -11
View File
@@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.Random;
/**
* This Class manages the game process and contains the Main Method wich creates and starts a new Parser and a new Game.
* This Class manages the game process and contains the Main Method which creates and starts a new Parser and a new Game.
*/
public class Siedler {
/**
@@ -20,7 +20,7 @@ public class Siedler {
/**
* The Method for the usual game Process. It contains the Main loop to get new commands from the players and calls the associated methods.
* @param parser The Parser Object which will interact with the player.
* @param game The Game object which is already created and has the foundig phase completed.
* @param game The Game object which is already created and has the founding phase completed.
*/
private static void gamePhase(Parser parser, SiedlerGame game) {
boolean running = true;
@@ -33,7 +33,7 @@ public class Siedler {
throwDice(parser, game);
diceThrown = true;
}
parser.displayPlayerInfo(game.getCurrentPlayerResource(), game.getCurrentPlayerWinpoints());
parser.displayPlayerInfo(game.getCurrentPlayerResource(), game.getCurrentPlayerWinPoints());
switch (parser.getAction()) {
case NEXTPLAYER:
if(caseNextPlayer(parser, game)){
@@ -145,7 +145,7 @@ public class Siedler {
}
}
//each Player bilds their second Settlement and second Road and gets a Payout for these Structures in usual order.
//each Player builds their second Settlement and second Road and gets a Payout for these Structures in usual order.
for(int player = 1; player <= gameInfo.get("NumberOfPlayers"); player++){
buildStructuresInFoundingPhase(parser, game, true);
game.switchToNextPlayer();
@@ -157,7 +157,7 @@ public class Siedler {
* The Method is called by foundingPhase. It prompts the Player to build a Settlement and a Road.
* @param parser The parser Object which will interact with the player.
* @param game The game Object which will be used to execute the Method.
* @param payout true (for second Settlement in founding Phase): the Player gets a payout for the settlment. false (for first Settlement in founding Phase): The Player gets no payout.
* @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());
@@ -165,27 +165,27 @@ public class Siedler {
//build Settlement
parser.giveCoordinatesForStructures(Config.Structure.SETTLEMENT);
boolean sucessful = false;
boolean successful = false;
do{
if(game.placeInitialSettlement(parser.getPoint(), payout)) {
sucessful = true;
successful = true;
}
else{
parser.errorMessage();
}
} while(!sucessful);
} while(!successful);
//build Road
parser.displayGameboard(game.getBoard().getTextView());
parser.giveCoordinatesForStructures(Config.Structure.ROAD);
sucessful = false;
successful = false;
do{
if(game.placeInitialRoad(parser.getPoint(), parser.getPoint())) {
sucessful = true;
successful = true;
}
else{
parser.errorMessage();
}
} while(!sucessful);
} while(!successful);
}
}