Skip to content

Commit

Permalink
sequel
Browse files Browse the repository at this point in the history
  • Loading branch information
Kloping committed Mar 14, 2022
1 parent df72769 commit 161d9f2
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/main/java/com/hrs/kloping/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,20 +468,22 @@ private static boolean isBigger(List<Card> cards, List<Card> cards1) {
public void tipsPool() {
long q = players.get(index);
Message message = playerEns.get(q).getValue();
if (this_cards == null) {
group.sendMessage(new MessageChainBuilder()
.append(message)
.append("轮到你出牌了,你可以随意出")
.build()
);
} else {
group.sendMessage(new MessageChainBuilder()
.append(message)
.append(getNowCardsName())
.append(getImageFromFilePath(Drawer.createImage(cards2Images(this_cards.cards)), group))
.append("轮到你出牌了,这是你要打的牌")
.build()
);
if (!overed) {
if (this_cards == null) {
group.sendMessage(new MessageChainBuilder()
.append(message)
.append("轮到你出牌了,你可以随意出")
.build()
);
} else {
group.sendMessage(new MessageChainBuilder()
.append(message)
.append(getNowCardsName())
.append(getImageFromFilePath(Drawer.createImage(cards2Images(this_cards.cards)), group))
.append("轮到你出牌了,这是你要打的牌")
.build()
);
}
}
}

Expand Down Expand Up @@ -556,10 +558,13 @@ private void tipsWillWin(long q, int n) {
group.sendMessage(new MessageChainBuilder().append(m.getNick()).append("警告!警告!就剩" + n + "张牌了!").build());
}

private boolean overed = false;

private void testWin() {
for (long q : playerCards.keySet()) {
List<Card> cards = playerCards.get(q);
if (cards.size() == 0) {
overed = true;
int n = players.indexOf(q);
if (n == landlord)
tipsLandlordWin();
Expand All @@ -586,7 +591,6 @@ private void tipsCivilianWin() {
builder.append(new At(q).plus(new Face(Face.DE_YI))).append("\n");
}
builder.append(new At(landlord).plus(new Face(Face.SHUAI))).append("\n");

builder.append("平民胜利!!!");
group.sendMessage(builder.build());
}
Expand Down

0 comments on commit 161d9f2

Please sign in to comment.