diff --git a/GPA675Lab1GOL/GOLTeamH.cpp b/GPA675Lab1GOL/GOLTeamH.cpp index 3e1e535..3f2d1cb 100644 --- a/GPA675Lab1GOL/GOLTeamH.cpp +++ b/GPA675Lab1GOL/GOLTeamH.cpp @@ -379,13 +379,13 @@ void GOLTeamH::setSolidColor(State state, Color const& color) mDeadColor = color; mColorEncoded &= 0; // Clear - mColorEncoded |= ((static_cast(mAliveColor.red) << 16) << 32 * static_cast(state)); - mColorEncoded |= ((static_cast(mAliveColor.green) << 8) << 32 * static_cast(state)); - mColorEncoded |= (static_cast(mAliveColor.blue) << 32 * static_cast(state)); + mColorEncoded |= (static_cast(mAliveColor.red) << 16) << 32; + mColorEncoded |= (static_cast(mAliveColor.green) << 8) << 32; + mColorEncoded |= static_cast(mAliveColor.blue) << 32; - mColorEncoded |= ((static_cast(mDeadColor.red) << 16) * static_cast(state)); - mColorEncoded |= ((static_cast(mDeadColor.green) << 8) * static_cast(state)); - mColorEncoded |= (static_cast(mDeadColor.blue) * static_cast(state)); + mColorEncoded |= (static_cast(mDeadColor.red) << 16); + mColorEncoded |= (static_cast(mDeadColor.green) << 8); + mColorEncoded |= static_cast(mDeadColor.blue); }