Merge pull request #20 from greno4ka/master

Closes #3
This commit is contained in:
Murilo Pereira 2018-05-07 13:24:52 +02:00 committed by GitHub
commit 5fb60cd42c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,18 @@ static void handle_card_movement(struct cursor *cursor) {
}
}
break;
case 'M':
if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) {
for (struct stack *i = *origin; i && i->next; i = i->next) {
while (i->next->card->face == EXPOSED &&
(i->card->frame->begin_y - i->next->card->frame->begin_y) > 1) {
erase_stack(*origin);
card_mark(i->next->card);
draw_stack(*origin);
}
}
}
break;
case 'n':
if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) {
for (struct stack *i = (*origin)->next; i; i = i->next) {
@ -116,6 +128,15 @@ static void handle_card_movement(struct cursor *cursor) {
}
}
break;
case 'N':
if (origin == cursor_stack(cursor) && maneuvre_stack(*origin)) {
erase_stack(*origin);
unmark_cards(*origin);
card_mark((*origin)->card);
draw_stack(*origin);
}
break;
case KEY_SPACEBAR:;
/* http://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg259382.html */
struct stack **destination = cursor_stack(cursor);