Skip to content

Commit

Permalink
[fix] known bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
remyhuang03 committed May 16, 2023
1 parent cf6f07d commit ce25ec3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion qt_guan_dan/PlayerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ void PlayerWidget::on_arrange_clicked(int mode)
}
}
}
sort_card_heap(true);
sort_card_heap(true,true);
//将所选牌加入牌堆
card_heaps_.push_back(std::make_pair<int, std::vector<Card>>(true, {}));
for (const Card& i : cards)
Expand Down
4 changes: 1 addition & 3 deletions qt_guan_dan/card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ bool operator==(const Card& card1, const Card& card2)
}
bool operator<(const Card& card1, const Card& card2)
{
//将A和2转换为相对值比较
//将A转换为相对值比较
double point1 = card1.point_;
if (point1 == 1)point1 = 13.1;
if (point1 == 2)point1 = 13.2;
double point2 = card2.point_;
if (point2 == 1)point2 = 13.1;
if (point2 == 2)point2 = 13.2;

if (point1 < point2)
return true;
Expand Down
2 changes: 1 addition & 1 deletion qt_guan_dan/guan_dan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


//debug:少发点牌,方便调试
#define DEBUG_CARD_CNT_ 2//正常值:27
#define DEBUG_CARD_CNT_ 27//正常值:27

guan_dan::guan_dan(QWidget* parent)
: QWidget(parent)
Expand Down
4 changes: 3 additions & 1 deletion qt_guan_dan/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void round_over()
group_level[winner_group] = new_level_t;

//更新级牌
int round_level_card = new_level_t;
round_level_card = new_level_t;

//更新牌点大小映射
update_cards_round_level();
Expand All @@ -123,6 +123,8 @@ void update_cards_round_level()
cards_round_level[14] = level_t++;
//大王
cards_round_level[15] = level_t++;

qDebug() << cards_round_level[2];
}

std::vector<Card> shuffled_all_cards()
Expand Down

0 comments on commit ce25ec3

Please sign in to comment.