Browse Source

FIX FILE STRUCTURE

master
Jakub Škrabánek 3 months ago
parent
commit
925a78ea45
  1. 2
      17_minihra/index.html
  2. 11
      17_minihra/js/game.js

2
17_minihra/index.html

@ -52,7 +52,7 @@
</ul> </ul>
</div> </div>
<script src="game.js"></script>
<script src="js/game.js"></script>
<script src="js/bootstrap.bundle.js"></script> <script src="js/bootstrap.bundle.js"></script>
</body> </body>
</html> </html>

11
17_minihra/game.js → 17_minihra/js/game.js

@ -23,6 +23,7 @@ function initGame() {
function hodkoustkou(steny) { function hodkoustkou(steny) {
// 1+zakrouhleni(gen<0-1>*6) -> [1-6] ; // 1+zakrouhleni(gen<0-1>*6) -> [1-6] ;
// 1+zakrouhleni(gen<0-1>*x) -> [1-x] ; // 1+zakrouhleni(gen<0-1>*x) -> [1-x] ;
// y+Math.round(Math.random*x) -> [y-x];
let x = 1+Math.floor(Math.random()*steny) ; let x = 1+Math.floor(Math.random()*steny) ;
console.log("x:"+x); console.log("x:"+x);
@ -87,15 +88,7 @@ function battlelog(text2log) {
document.getElementById("battlelog").innerHTML += text2log; document.getElementById("battlelog").innerHTML += text2log;
} }
//GameDesign talkpoints????
//enemy -> generator enemy? //enemy -> generator enemy?
//hero -> generace hrdiny? //hero -> generace hrdiny?
/*gameplay /*gameplay
Loading…
Cancel
Save