diff --git a/tree/0_start.html b/tree/0_start.html index 76f013d..935a5c4 100644 --- a/tree/0_start.html +++ b/tree/0_start.html @@ -8,18 +8,25 @@ -

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. +
+

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.

- diff --git a/tree/index.html b/tree/index.html index 7ddf281..544e799 100644 --- a/tree/index.html +++ b/tree/index.html @@ -9,23 +9,25 @@
- 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
- or like + or 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'); + + } + +} + + + + + + +