From 8af1f9a5ed7ad678b252d73b54f9844b1dd6b286 Mon Sep 17 00:00:00 2001 From: salman-abedin Date: Sat, 19 Dec 2020 17:08:01 +0600 Subject: [PATCH] added a readme moja --- README.md | 21 +++++++++++++-------- script.js | 7 +++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aa26299..3a19f78 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Power Six: E-Ink Friendly Multi-player Chess App -Power Six is a web app I am working on in order to play chess with my friends on **Kindle Paperwhite 4**. 😎 +Power Six is a web app I am working on in order to play chess with my friends on my **Kindle Paperwhite 4**. 😎 - + # Usage @@ -20,15 +20,12 @@ Go to [is.gd/powersix](https://is.gd/powersix) using the **Experimental Browser* - Have fun cracking your brain. 😄 -# Version Log - -- **0.1.0**: Playable. 😅 # Confirmed Devices -- Amazon Kindle Basic -- Amazon Kindle Paperwhite -- Amazon Kindle Oasis +- Kindle Basic +- Kindle Paperwhite +- Kindle Oasis # TODOs @@ -39,6 +36,14 @@ Go to [is.gd/powersix](https://is.gd/powersix) using the **Experimental Browser* - Customizations - Engine for Single Player +# Note for Developers + +- Don't use newer CSS/Javascript features + +# Version Log + +- **0.1.0**: Playable. 😅 + # Contact SalmanAbedin@disroot.org diff --git a/script.js b/script.js index 16215d3..5d6cde5 100644 --- a/script.js +++ b/script.js @@ -36,6 +36,12 @@ function img_tag(i, j) { } function handle_click() { + // if ( + // (whites_turn && $(this).html().includes('black')) || + // (!whites_turn && $(this).html().includes('white')) + // ) { + // return; + // } if (selected) { if ($(this).html() === selected.html()) { selected.css('border', ''); @@ -55,6 +61,7 @@ function handle_click() { transform: whites_turn ? 'rotate(0deg)' : 'rotate(180deg)', }); } else { + if (!$(this).html()) return; selected = $(this); $('.square').css('border', ''); selected.css('border', '10px solid black');