Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #115

Merged
merged 1 commit into from
Jul 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions GeneralMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public GeneralMap(String[] playerList, int[] colorList)

if ( playerList.length > 4 )
{
players[4].addToStars(2);
players[4].addToStars(2);
}
}

Expand Down Expand Up @@ -586,23 +586,29 @@ private int calculateArmies()
// 3. Einheiten durch Kontinente

// Kontinente durchgehen
for ( int i = 1; i < continentBoni.length; i++ )
for ( int i = 1; i <= (continentBoni.length -1); i++ )
{
continentArray = giveContinentArray(i);

// Provinzen des aktuellen Kontinents durchgehen
for ( int p = 1; p >= continentArray.length; p++ )
for ( int p = 0; p < continentArray.length; p++ )
{
// Prüfen, ob eine Provinz NICHT dem aktuellen Spieler gehört
if ( continentArray[p].getOwner() != currentPlayer )
/** if ( continentArray[p].getOwner() != currentPlayer )
{
break;
break;
}
// Wenn nicht, wird der Kontinent als gecheckt markiert
else
{
continentChecked = true;
}
continentChecked = true;
} */

System.out.println( continentArray[p].getOwner() );
System.out.println( continentArray[p].getDisplayName() );
System.out.println("===============");
}

if ( continentChecked == true )
{
armiesToPlace = armiesToPlace + continentBoni[i];
Expand Down Expand Up @@ -639,7 +645,7 @@ private int calculateArmies()
JOptionPane.showMessageDialog(null,"Ungültige Zahl. Bitte eine Zahl zwischen 0 und 10 eingeben");
}
}

else
{
JOptionPane.showMessageDialog(null,"Du besitzt nicht die erforderliche Anzahl an Sternen! \n Verarschen kannst du jemand anderen.");
Expand Down