It's Saturday morning. You are sitting on a bench at the park waiting for your friend Amanda. She seems to be really late.
+
+
Hello . It's Saturday morning. You are sitting on a bench at the park waiting for your friend Amanda. She seems to be really late.
You spot a copy of today's newspaper on the bench. Maybe you want to give it a read. You can go for a little walk or just wait for Amanda if you feel like it.
- welcome to *name*, in this story you will be someone called .
- You will look like
+ welcome to *game_name*, in this story you will be someone called
+ .
+
+ You can decide whether you are going to look like this
-
-
-
+
+
diff --git a/tree/index.js b/tree/index.js
index bdd4cfb..97a711d 100644
--- a/tree/index.js
+++ b/tree/index.js
@@ -7,9 +7,26 @@ document.querySelector("#player1").onchange = updateAvatar
document.querySelector("#player2").onchange = updateAvatar
function updateAvatar () {
- console.log("CHANGE");
- var fd = new FormData(f)
+ //console.log("CHANGE");
+ var fd = new FormData(f);
var avatar=fd.get("player_avatar")
console.log("avatar", avatar);
- localStorage.myavatar=avatar
+ localStorage.myavatar=avatar;
}
+// store username in local storage + make sure the player added it
+function storeName(){
+var inputPlayer = document.querySelector('#player_name').value;
+localStorage.playerName=inputPlayer;
+if( document.querySelector('#player_name').value === '' ){
+ alert('empty');
+
+ }
+
+}
+
+
+
+
+
+
+