mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibCards+Solitaire: Rename CardStack::move_to_stack()
-> take_all()
`a.move_to_stack(b)` sounded too much like it moves a's cards to b, when it actually moves b's cards to a.
This commit is contained in:
parent
3423b54eb9
commit
83687f85df
3 changed files with 3 additions and 3 deletions
|
@ -424,7 +424,7 @@ void Game::draw_cards()
|
|||
update(stock.bounding_box());
|
||||
} else {
|
||||
auto play_bounding_box = play.bounding_box();
|
||||
play.move_to_stack(waste);
|
||||
play.take_all(waste);
|
||||
|
||||
size_t cards_to_draw = 0;
|
||||
switch (m_mode) {
|
||||
|
|
|
@ -323,7 +323,7 @@ NonnullRefPtr<Card> CardStack::pop()
|
|||
return card;
|
||||
}
|
||||
|
||||
void CardStack::move_to_stack(CardStack& stack)
|
||||
void CardStack::take_all(CardStack& stack)
|
||||
{
|
||||
while (!m_stack.is_empty()) {
|
||||
auto card = m_stack.take_first();
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
void push(NonnullRefPtr<Card> card);
|
||||
NonnullRefPtr<Card> pop();
|
||||
void move_to_stack(CardStack&);
|
||||
void take_all(CardStack&);
|
||||
void rebound_cards();
|
||||
|
||||
bool is_allowed_to_push(Card const&, size_t stack_size = 1, MovementRule movement_rule = MovementRule::Alternating) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue