Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 527 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 527 Bytes

This repository contains a half-hour lesson in coding with my son. He does video game livestreaming and made a tool in Scratch that would pick a random Super Mario Galaxy level for him to play. After exploring his approach together, I showed him how it might be done in Java.

In a nutshell, this works by using the Scanner class to read a file from disk. The file is organized as a hierarchy of Galaxies, Stars, and Worlds. The file is read, parsed into objects and then a random level is picked.