Changed it so that hand is printed horizontally instead of vertically.
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -26,9 +26,8 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>11</maven.compiler.source>
|
<maven.compiler.source>16</maven.compiler.source>
|
||||||
<maven.compiler.target>11</maven.compiler.target>
|
<maven.compiler.target>16</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -89,7 +89,12 @@ public class Human extends Player {
|
|||||||
List<Card> hand = getHand();
|
List<Card> hand = getHand();
|
||||||
for (int i = 0; i < hand.size(); i++) {
|
for (int i = 0; i < hand.size(); i++) {
|
||||||
Card card = hand.get(i);
|
Card card = hand.get(i);
|
||||||
System.out.println("(" + i + ") " + card);
|
if (i == 0) {
|
||||||
|
System.out.println("Your hand: ");
|
||||||
|
System.out.printf("(%s) %s ", i, card);
|
||||||
|
} else {
|
||||||
|
System.out.printf("| (%s) %s ", i, card);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user