From 4b7efd1f17e8029f352ea098d7c7b2898bf8b5ea Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Wed, 7 Mar 2018 22:25:26 +0900
Subject: [PATCH] :v:

---
 src/common/othello.ts                                | 3 +++
 src/web/app/common/views/components/othello.game.vue | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/common/othello.ts b/src/common/othello.ts
index 1057e6b9a..5d95fd2fe 100644
--- a/src/common/othello.ts
+++ b/src/common/othello.ts
@@ -29,6 +29,8 @@ export default class Othello {
 		});
 	}
 
+	public prevPos = -1;
+
 	public get blackCount() {
 		return this.board.filter(s => s == 'black').length;
 	}
@@ -59,6 +61,7 @@ export default class Othello {
 	 * 石を配置します
 	 */
 	public set2(color, x, y) {
+		this.prevPos = x + (y * 8);
 		this.write(color, x, y);
 
 		const reverses = this.getReverse(color, x, y);
diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue
index 70c9965ee..1cb2400f7 100644
--- a/src/web/app/common/views/components/othello.game.vue
+++ b/src/web/app/common/views/components/othello.game.vue
@@ -10,7 +10,7 @@
 	</p>
 	<div class="board">
 		<div v-for="(stone, i) in o.board"
-			:class="{ empty: stone == null, myTurn: isMyTurn, can: o.canReverse(turn.id == game.black_user.id ? 'black' : 'white', i) }"
+			:class="{ empty: stone == null, myTurn: isMyTurn, can: o.canReverse(turn.id == game.black_user.id ? 'black' : 'white', i), prev: o.prevPos == i }"
 			@click="set(i)"
 		>
 			<img v-if="stone == 'black'" :src="`${game.black_user.avatar_url}?thumbnail&size=64`" alt="">
@@ -218,6 +218,9 @@ export default Vue.extend({
 					&:active
 						background darken($theme-color, 10%)
 
+			&.prev
+				box-shadow 0 0 0 4px rgba($theme-color, 0.7)
+
 			> img
 				display block
 				width 100%