summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/index.js b/client/index.js
index 3a643a5..0b917ac 100644
--- a/client/index.js
+++ b/client/index.js
@@ -108,14 +108,16 @@ function white(){
return false
})
}
-function stripex(){
+function stripex(odd){
+ odd = !! odd
forEach((x,y,state) => {
- return x % 2
+ return x % 2 ? odd : !odd
})
}
-function stripey(){
+function stripey(odd){
+ odd = !! odd
forEach((x,y,state) => {
- return y % 2
+ return y % 2 ? odd : !odd
})
}
function noise(){
@@ -247,10 +249,10 @@ function keydown(e){
noise()
break
case 69: // e
- stripex()
+ stripex(Math.random() < 0.5)
break
case 82: // r
- stripey()
+ stripey(Math.random() < 0.5)
break
}
}