fix
This commit is contained in:
@@ -37,6 +37,7 @@ void DealCards(int N, SqList<int>*& PA, SqList<int>*& PB, int times)
|
||||
delete[] CardPile; // 释放发牌堆占用的内存
|
||||
}
|
||||
|
||||
// 输出B的手牌
|
||||
void DisplayPlayerBCards(int*& QB, int N)
|
||||
{
|
||||
for (int i = 0; i < N; i++)
|
||||
@@ -45,7 +46,7 @@ void DisplayPlayerBCards(int*& QB, int N)
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
bool IsPlayerBWin(int*& QB, int N)
|
||||
bool IsPlayerAWin(int*& QB, int N)
|
||||
{
|
||||
for (int i = 0; i < N; i++)
|
||||
if (QB[i] > 0) return false;
|
||||
@@ -153,7 +154,7 @@ int GamePlay2(SqList<int>& PA, SqList<int>& PB, int N)
|
||||
winner = 2;
|
||||
break;
|
||||
}
|
||||
else if (IsPlayerBWin(QB, N))
|
||||
else if (IsPlayerAWin(QB, N))
|
||||
{
|
||||
winner = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user