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

Related tags

Miscellaneousnngtools
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.

Owner
Thanos Tsouanas
Thanos Tsouanas
AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

DeepMind 814 Dec 26, 2022
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

██████╗ ██╗██████╗ ███████╗██╗ ██╗███╗ ██╗███████╗ ██████╗ ██╔══██╗██║██╔══██╗██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝ ██████╔╝██║██████╔╝█

Julian Kemmerer 391 Jan 01, 2023
A desktop app to check the unlocked courses bases on previously done courses.

Course Picker A desktop app to check the unlocked courses bases on previously done courses. Table of contents About the Project Built with What it doe

Ahmed Symum Swapno 3 Feb 07, 2022
A Web app to Cross-Seed torrents in Deluge/qBittorrent/Transmission

SeedCross A Web app to Cross-Seed torrents in Deluge/qBittorrent/Transmission based on CrossSeedAutoDL Require Jackett Deluge/qBittorrent/Transmission

ccf2012 76 Dec 19, 2022
The Begin button and menu for the Meadows operating system. The start button for UNIX/Linux.

By: Seanpm2001, Meadows Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afri

Sean P. Myrick V19.1.7.2 4 Aug 28, 2022
💉 🔍 VaxFinder - Backend The backend for the Vaccine Hunters Finder tool.

💉 🔍 VaxFinder - Backend The backend for the Vaccine Hunters Finder tool. Development Prerequisites Python 3.8 Poetry: A tool for dependency manageme

Vaccine Hunters Canada 32 Jan 19, 2022
LINUX-AOS (Automatic Optimization System)

LINUX-AOS (Automatic Optimization System)

1 Jul 12, 2022
Batch generate asset browser previews

When dealing with hundreds of library files it becomes tedious to mark their contents as assets. Using python to automate the process is a perfect fit

54 Dec 24, 2022
Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Clifford Onyonka 2 Feb 23, 2022
Basit bir cc generator'ü.

Basit bir cc generator'ü. Setup What To Do; Python Installation We install python from CLICK Generator Board After installing the file and python, we

Lâving 7 Jan 09, 2022
Simple python bot, that notifies about new manga chapters through Telegram.

Simple python bot, that notifies about new manga chapters through Telegram.

Dmitry Kopturov 1 Dec 05, 2021
- Auto join teams teams ( from calendar invite )

Auto Join Teams Meetings Requirements: Python 3.7 or higher Latest Google Chrome This script automatically logins to your account and joins the meetin

Prajin Khadka 10 Aug 20, 2022
A promo calculator for sports betting odds.

Sportbetter Calculation Toolkit Parlay Calculator This is a quick parlay calculator that considers some of the common promos offered. It is used to id

Luke Bhan 1 Sep 08, 2022
Hacktoberfest2021 🥳- Contribute Any Pattern In Any Language😎 Every PR will be accepted Pls contribute

✨ Hacktober Fest 2021 ✨ 🙂 All Contributors are requested to star this repo and follow me for a successful merge of pull request. 🙂 👉 Add any patter

Md. Almas Ali 103 Jan 07, 2023
Use Fofa、shodan、zoomeye、360quake to collect information(e.g:domain,IP,CMS,OS)同时调用Fofa、shodan、zoomeye、360quake四个网络空间测绘API完成红队信息收集

Cyberspace Map API English/中文 Development fofaAPI Completed zoomeyeAPI shodanAPI regular 360 quakeAPI Completed Difficulty APIs uses different inputs

Xc1Ym 61 Oct 08, 2022
Demo of a WAM Prolog implementation in Python

Prol: WAM demo This is a simplified Warren Abstract Machine (WAM) implementation for Prolog, that showcases the main instructions, compiling, register

Bruno Kim Medeiros Cesar 62 Dec 26, 2022
📽 Streamlit application powered by a PyScaffold project setup

streamlit-demo Streamlit application powered by a PyScaffold project setup. Work in progress: The idea of this repo is to demonstrate how to package a

PyScaffold 2 Oct 10, 2022
A Python Based Utility for Processing GST-Return JSON Files to Multiple Formats

GSTR 1/2A Utility by Shan.tk Open Source GSTR 1/GSTR 2A JSON to Excel utility based on Python. Useful for Auditors in Verifying GSTR 1 Return Invoices

Sudharshan TK 1 Oct 08, 2022
My solutions to Advent of Code 2021 (written in Python)

Advent of Code 2021 This repository contains my solutions for the 2021 edition of Advent of Code. Please do not expect perfectly polished solutions, m

Nils 2 May 29, 2022
pvaPy provides Python bindings for EPICS pvAccess

PvaPy - PvAccess for Python The PvaPy package is a Python API for EPICS7. It supports both PVA and CA providers, all standard EPICS7 types (structures

EPICS Base 25 Dec 05, 2022