fix
This commit is contained in:
@@ -18,12 +18,12 @@ inline void DealCards(int N, SqList<int>*& PA, SqList<int>*& PB)
|
||||
{
|
||||
if (CardPile[num] != 0) // 如果该数对应面值的牌未发完
|
||||
{
|
||||
if (i % 2 == 0) // 发给PA
|
||||
if (i % 2 == 0) // 如果发牌次数(i+1)为奇数,则发给PA
|
||||
{
|
||||
InsertElem_i(*PA, j++, num + 1);
|
||||
CardPile[num]--;
|
||||
}
|
||||
else // 发给PB
|
||||
else // 否则发给PB
|
||||
{
|
||||
InsertElem_i(*PB, k++, num + 1);
|
||||
CardPile[num]--;
|
||||
@@ -49,10 +49,4 @@ inline int FindElem(SqStack<int>& S, int e)
|
||||
inline bool IsPlayerA(int i)
|
||||
{
|
||||
return i % 2 == 1;
|
||||
}
|
||||
|
||||
// 返回栈元素数量
|
||||
inline int StackSize(SqStack<int>& S)
|
||||
{
|
||||
return S.top + 1;
|
||||
}
|
||||
Reference in New Issue
Block a user