1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

LibCards+Games: Rename "draw" methods to "paint" for clarity

"Draw" is already a card-game term so using it for graphics was
 confusing me a lot!
This commit is contained in:
Sam Atkins 2022-09-28 12:27:19 +01:00 committed by Sam Atkins
parent 6ef0504a42
commit bfa9ae809f
8 changed files with 17 additions and 17 deletions

View file

@ -896,21 +896,21 @@ void Game::paint_event(GUI::PaintEvent& event)
if (!game_ended()) {
for (auto& card : player.hand)
if (!card.is_null())
card->draw(painter);
card->paint(painter);
} else {
// FIXME: reposition cards in advance_game() maybe
auto card_position = player.first_card_position;
for (auto& card : player.cards_taken) {
card->set_upside_down(false);
card->set_position(card_position);
card->draw(painter);
card->paint(painter);
card_position.translate_by(player.card_offset);
}
}
}
for (size_t i = 0; i < m_trick.size(); i++)
m_trick[i].draw(painter);
m_trick[i].paint(painter);
}
void Game::dump_state() const