This research explores the concept of edutainment where the basics of programming are introduced to children while playing a game with a social humanoid robot. The goal of the game is to exit the maze - the child is asked by the robot to make it walk through the maze to its exit. The child needs to learn the basics of programming through the game via drag-and-drop instructions on the tablet screen. This paper presents an HRI study which aims to investigate which role of the robot (peer vs. teacher) would result in more learning gains in this particular application. The findings suggest that children complete the task much quicker with the peer robot while a teacher robot is shown to be more effective for learning.