King's Scroll: An Educational Game to Practise Code PredictionGlobalK12In-Person
Learning to program can often be a daunting task. The syntax of new programming languages can be intimidating and on top of that compilers are unforgiving. The combination of these things can be discouraging for new students. Recently there has been a push in the field of Computing Education Research to apply the Predict-Run-Investigate-Modify-Make (PRIMM) approach when teaching programming concepts. The aim is to push students to practise reading and investigating existing code before going on to write their own code, as a way to build self-confidence and boost their understanding. In this work we present an educational game that aims to help students practise their code prediction abilities. The game uses a simple story set in a medieval fantasy kingdom to create a welcoming, less intimidating environment. Users are presented with randomly generated pieces of JavaScript code that modify four core Boolean variables (shield, sword, cape and helmet). By making use of the state tables, students can manually walk through the code and predict the final result. A user ends the round by selecting the hero that matches the description of the final state of all four variables. The presented heroes are further randomly assigned physical characteristics such as gender, skin tone and hair colour, promoting inclusivity and lowering the bar of entry via representation. The game allows users to indicate which language features they already know, thereby generating JavaScript that is understandable by a broad variety of students.