Tools for teachers and students using nng (Natural Number Game)

Overview

nngtools

Usage

  1. Place your nngsave.json to the directory in which you want to extract the level files.
  2. Place nngmap.json on the same directory.
  3. Run nngsave2files.py nngsave.json. This should create a bunch of wold dirs / level files.

How to save/load your game

The following is taken from this message by mpedramfar. I have altered the savegame javascript code to: (i) prettyprint the json file instead of dumping it as a single line; (ii) use the name nngsave.json for the created file.

Create the bookmarks:

  • nng-save, using the following URL:
javascript:(function save(data, filename) { if(!window.location.href.endsWith("natural_number_game/")){ alert("To load saved game, go to the main page first!"); return;  }; var file = new Blob([JSON.stringify(JSON.parse(data), null, 2)]); var a = document.createElement("a"), url = URL.createObjectURL(file); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); setTimeout(function() { document.body.removeChild(a); window.URL.revokeObjectURL(url);  }, 0);  })(window.localStorage.getItem("Natural number game-1-savedGameData"), "nngsave.json");
  • nng-load, with the following URL:
{ const files = uploader.files; if (files.length) { const reader = new FileReader(); reader.addEventListener('load', () => { uploader.parentNode.removeChild(uploader); resolve(reader.result); }); reader.readAsText(files[0]); }; }); document.body.appendChild(uploader); document.getElementById("root").style.display = 'none'; }; }); })().then(text => { console.log(text); if(text){ window.localStorage.setItem("Natural number game-1-savedGameData", text); window.location.reload(); }; });">
javascript:(function(){ return new Promise((resolve) => { if(!window.location.href.endsWith("natural_number_game/")){ alert("To load saved game, go to the main page first!"); resolve("");  }else{ const uploader = document.createElement('input'); uploader.type = 'file'; uploader.style.position = 'relative'; uploader.addEventListener('change', () => { const files = uploader.files; if (files.length) { const reader = new FileReader(); reader.addEventListener('load', () => { uploader.parentNode.removeChild(uploader); resolve(reader.result);  }); reader.readAsText(files[0]);  };  }); document.body.appendChild(uploader); document.getElementById("root").style.display = 'none';  };  });  })().then(text => { console.log(text); if(text){ window.localStorage.setItem("Natural number game-1-savedGameData", text); window.location.reload();  };  });

Notes

The file nngmap.json contains a map from level statements to world and level numbers. This file is created by running mknngmap.py on a complete nng savegame, placed on the src/game directory of natural_number_game. Normally you will not need to run this; you can just use the nngmap.json provided here.

You might also like...
Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.
Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.

Introduction: If you want to know sura number of al quran by just typing the name of sura than you can use this script. Usage in termux: $ pkg install

x-tools is a collection of tools developed in Python

x-tools X-tools is a collection of tools developed in Python Commands\

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file
Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file. VISD can also perform vehicle speed detection on a video. All these features of VSID are provided to the user using a Web Application which is created using Flask

This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json object is then used to post data to a specified table in a local MySQL database, credentials of which the user must set.

Simple calculator with random number button and dark gray theme created with PyQt6
Simple calculator with random number button and dark gray theme created with PyQt6

Calculator Application Simple calculator with random number button and dark gray theme created with : PyQt6 Python 3.9.7 you can download the dark gra

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan

This tool for beginner and help those people they gather information about Email Header Analysis, Instagram Information, Instagram Username Check, Ip Information, Phone Number Information, Port Scan. This tool shows your hostname and public IP first, then user give input and according to option this tool work. This tool work diffrent Oprating system.

Unofficial package for fetching users information based on National ID Number (Tanzania)

Nida Unofficial package for fetching users information based on National ID Number made by kalebu Installation You can install it directly or using pi

Owner
Thanos Tsouanas
Thanos Tsouanas
Developed a website to analyze and generate report of students based on the curriculum that represents student’s academic performance.

Developed a website to analyze and generate report of students based on the curriculum that represents student’s academic performance. We have developed the system such that, it will automatically parse data onto the database from excel file, which will in return reduce time consumption of analysis of data.

VIJETA CHAVHAN 3 Nov 8, 2022
Academic planner application designed for students and counselors.

Academic planner application designed for students and counselors.

Ali bagheri 2 Dec 31, 2021
Simple Python-based web application to allow UGM students to fill their QR presence list without having another device in hand.

Praesentia Praesentia is a simple Python-based web application to allow UGM students to fill their QR presence list without having another device in h

loncat 20 Sep 29, 2022
An app to automatically take attendance by scanning students' bar coded ID card as they enter the classroom.

Auto Classroom Attendance This application may be run on a PC to automatically scan students' ID card using a generic bar code scanner and output the

null 1 Nov 10, 2021
This is a simple python script for checking A/L Examination results of srilankan students

AL-Result-Checker This is a simple python script for checking A/L Examination results of srilankan students INSTALLATION [Termux] [Linux] : apt-get up

Razor Kenway 8 Oct 24, 2022
An educational platform for students

Watch N Learn About Watch N Learn is an educational platform for students. Watch N Learn incentivizes students to learn with fun activities and reward

Brian Law 3 May 4, 2022
A project to empower needy-students.

Happy Project ?? A project to empower needy-students. Happy Project is a non-profit initiation founded by IT people from Jaffna, Sri Lanka. This is to

null 1 Mar 14, 2022
AIO solution for SSIS students

ssis.bit AIO solution for SSIS students Hardware CircuitPython supports more than 200 different boards. Locally available is the TTGO T8 ESP32-S2 ST77

null 3 Jun 5, 2022
Advanced python code - For students in my advanced python class

advanced_python_code For students in my advanced python class Week Topic Recordi

Ariel Avshalom 3 May 27, 2022