mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:57:34 +00:00
LibCards+Games: Move mark_intersecting_stacks_dirty()
to CardGame
As part of this, made a const overload for `Card::rect()`. We need the non-const one too as it's used for modifying the position of a card that's being dragged. I plan on changing that soon but we'll see.
This commit is contained in:
parent
12612703f9
commit
5960c0556f
7 changed files with 12 additions and 22 deletions
|
@ -521,16 +521,6 @@ void Game::auto_move_eligible_cards_to_foundations()
|
|||
auto_move_eligible_cards_to_foundations();
|
||||
}
|
||||
|
||||
void Game::mark_intersecting_stacks_dirty(Card& intersecting_card)
|
||||
{
|
||||
for (auto& stack : stacks()) {
|
||||
if (intersecting_card.rect().intersects(stack.bounding_box()))
|
||||
update(stack.bounding_box());
|
||||
}
|
||||
|
||||
update(intersecting_card.rect());
|
||||
}
|
||||
|
||||
void Game::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
Gfx::Color background_color = this->background_color();
|
||||
|
|
|
@ -159,7 +159,6 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void mark_intersecting_stacks_dirty(Card& intersecting_card);
|
||||
void score_move(CardStack& from, CardStack& to, bool inverse = false);
|
||||
void score_flip(bool inverse = false);
|
||||
void remember_move_for_undo(CardStack& from, CardStack& to, NonnullRefPtrVector<Card> moved_cards);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue