summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sirtet.c3
-rw-r--r--ui.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/sirtet.c b/sirtet.c
index 4347fc3..e3c0590 100644
--- a/sirtet.c
+++ b/sirtet.c
@@ -129,6 +129,7 @@ void sirtet() {
// select piece
bool piece_confirmed = false;
int pc_idx;
+ struct piece* pc;
for (int i = 0; i < P; i++) {
if (hand[i] != NULL) {
pc_idx = i;
@@ -144,6 +145,7 @@ void sirtet() {
switch (ch) {
case 10: // enter
piece_confirmed = true;
+ pc = hand[pc_idx];
break;
case KEY_LEFT:
for (int i = 0; i < P; i++) {
@@ -164,7 +166,6 @@ void sirtet() {
}
}
- struct piece* pc = hand[pc_idx];
// select position
bool pos_confirmed = false;
diff --git a/ui.c b/ui.c
index 8693119..28f6f5c 100644
--- a/ui.c
+++ b/ui.c
@@ -51,6 +51,7 @@ void printpiece(struct piece* pc, int y, int x, int color_pair) {
}
}
attroff(COLOR_PAIR(color_pair));
+ refresh();
}
void printpieces(struct piece** hand, int y, int x, int nhand, int highlight) {