From 7a9712061d9af84b670c749b673b4dd3928336f7 Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Tue, 15 Oct 2013 19:38:47 +0530 Subject: [PATCH] Added game over notification --- resources/public/index.html | 2 +- src/cljs/frpong/core.cljs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/public/index.html b/resources/public/index.html index 18ab5bc..5278ef8 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -50,7 +50,7 @@ body { Gravity - + press <space> to start diff --git a/src/cljs/frpong/core.cljs b/src/cljs/frpong/core.cljs index 4c0c363..e1d4d0a 100644 --- a/src/cljs/frpong/core.cljs +++ b/src/cljs/frpong/core.cljs @@ -311,9 +311,11 @@ score-el (dom/by-id "score") lpaddle-el (dom/by-id "lpaddle") rpaddle-el (dom/by-id "rpaddle") - fps-el (dom/by-id "fps")] + fps-el (dom/by-id "fps") + title-el (dom/by-id "title")] (dom/set-style! ball-el "fill" "orange") (dom/set-text! state-el "") + (dom/set-text! title-el "Gravity Pong!") (go (loop [fps-p nil score-p nil] (let [fps (int (/ 1000 ( to restart") + (dom/set-text! title-el "GAME OVER") (start-on-space))) (recur fps score))))))