Преглед на файлове

scroll fixed and set default snake length to 1

eraisedtoipi преди 10 години
родител
ревизия
c47de59bcf
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 5 1
      index.html
  2. 1 1
      js/controller.js

+ 5 - 1
index.html

@@ -18,7 +18,11 @@
   <script src="js/controller.js"></script>
 	<script src="js/script.js"></script>
   <script src="js/ng-app.js"></script>
-
+<script>
+window.onscroll = function () {
+window.scrollTo(0,0);
+}
+</script>
   <link rel="stylesheet" type="text/css" href="css/style.css">
   <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
   <link rel="icon" href="img/favicon.ico" type="image/x-icon">

+ 1 - 1
js/controller.js

@@ -1,6 +1,6 @@
 var Controller = function(){
 	this.grid_size = {x: 20, y: 20};
-	this.initial_length = 3;
+	this.initial_length = 1;
 	this.time_step = 400;
     this.maximum_spawns = 2;
 	this.collectibles = [];