M index.html => index.html +24 -1
@@ 7,12 7,35 @@
<title>marchagotchi.js</title>
<meta name="author" content="eli_oat">
<meta name="description" content="a virtual pet">
+ <style type="text/css">
+ body {
+ max-width: 40em;
+ margin: 0 auto;
+ display: block;
+ padding: 1em 2em;
+ }
+
+ button {
+ width: 75%;
+ display: block;
+ margin: 1em auto;
+ padding: 1em 2em;
+ background-color: transparent;
+ border: 1px solid #ddd;
+ border-radius: 7px;
+ }
+
+ button:hover, button:focus {
+ cursor: pointer;
+ }
+
+ </style>
</head>
<body>
<h1 id="pet">(^ω^)</h1>
- <h2 id="lastAction"></h2>
+ <h2 id="lastAction">🐣</h2>
<ul id="petStats">
<li id="hunger"></li>
M marchagotchi.js => marchagotchi.js +2 -0
@@ 153,9 153,11 @@ const gamePlayLoop = () => {
if (petIsAlive === false) {
document.getElementById('pet').textContent = 'PET IS DEAD';
+ document.getElementById('lastAction').textContent = '☠️';
console.log('GAME OVER!');
gameOver();
};
+
})();
};