Skip to content

Commit 2008411

Browse files
committed
without assert it looks perfect. still rarely fails
now not going through dying jewels
1 parent a24b4fc commit 2008411

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

JewelBoard.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ void JewelBoard::shiftDown(BoardPos pos)
136136

137137
{
138138
BoardPos next = pos.getBelow();
139+
//@bug still would rarely fails.pending to investigate
139140
//assert(getJewel(next).isDead());
140141
LOG_INFO("jewel " << next << " popped up ");
141142

@@ -163,7 +164,7 @@ void JewelBoard::update()
163164
JewelObject &jo = getJewel(pos);
164165
if (jo.isFallDone())
165166
shiftDown(pos);
166-
if (pos.m_row > 0 && (jo.isFalling() || jo.isDead()))
167+
if (pos.m_row > 0 && !jo.isDying() && (jo.isFalling() || jo.isDead()))
167168
{
168169
BoardPos const upperPos = BoardPos(pos.m_col, pos.m_row - 1);
169170
JewelObject &upper = getJewel(upperPos);

JewelObject.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "TextureManager.h"
1212
#include "Game.h"
1313

14-
const short JewelObject::FALLING_STEPS = 60;
14+
const short JewelObject::FALLING_STEPS = 30;
1515

1616
JewelObject::JewelObject(Jewel &jewel, bool firstRow) :
1717
m_model(&jewel),

0 commit comments

Comments
 (0)