Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void transfer(Player player)
- {
- int x;
- System.out.println("Select source/target territories for a transfer.");
- status();
- choice();
- Territory territoryOutput = territoryInput();
- do
- {
- x = 0;
- do
- {
- if ( territoryOutput.ownerCheck() == player || territoryOutput.ownerCheck() == null )
- {
- player.placeArmies(-1,territoryOutput);
- x++;
- }
- else
- {
- choice();
- territoryOutput = territoryInput();
- }
- }
- while (x != 1);
- choice();
- territoryOutput = territoryInput();
- do
- {
- if( territoryOutput.ownerCheck() == player || territoryOutput.ownerCheck() == null )
- {
- player.placeArmies(1,territoryOutput);
- x++;
- }
- else
- {
- choice();
- territoryOutput = territoryInput();
- }
- }
- while (x != 2);
- status();
- choice();
- territoryOutput = territoryInput();
- }
- while ( territoryOutput != null );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement