Line 94: | Line 94: | ||
<script src="https://2017.igem.org/Template:SJTU-BioX-Shanghai/Javascript/2048? | <script src="https://2017.igem.org/Template:SJTU-BioX-Shanghai/Javascript/2048? | ||
action=raw&ctype=text/javascript"></script> | action=raw&ctype=text/javascript"></script> | ||
+ | <script> | ||
+ | var bt1=document.getelementbyid("btn1"); | ||
+ | var bt2=document.getelementbyid("btn2"); | ||
+ | function bt1{ | ||
+ | addClass(bt1,"active"); | ||
+ | removeClass(bt2,"active"); | ||
+ | mergerule=0; | ||
+ | } | ||
+ | function bt2{ | ||
+ | addClass(bt2,"active"); | ||
+ | removeClass(bt1,"active"); | ||
+ | mergerule=1; | ||
+ | } | ||
+ | function addClass(obj, cls) { | ||
+ | if (!this.hasClass(obj, cls)) obj.className += " " + cls; | ||
+ | } | ||
+ | function removeClass(obj, cls) { | ||
+ | if (hasClass(obj, cls)) { | ||
+ | var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); | ||
+ | obj.className = obj.className.replace(reg, ' '); | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
</html> | </html> |
Revision as of 14:25, 7 October 2017
2048
0
0
Color mixing version of 2048
New GameHow to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one!
Note: This is the special version of 2048 game to help people feel the rules of color mixing. Adapter is SJTU-Biox-Shanghai.
Original 2048 game is created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer.