Highlights
Introduction
In Assignment 2 you implemented a text-based version of the Key Cave Adventure Game. In Assignment 3 you will modify this game to a graphical user interface (GUI) based game. Your implementation should maintain the Apple model-view-controller (Apple MVC) structure used in Assignment 2. In this assignment, the View must be implemented using tkinter.
The new version of this game is a single-player GUI-based game in which the player is presented with a grid of squares (represented by either coloured rectangles or images). The objective is for the ibis (the player) to collect the trash and take it to their nest. This game is full of adventure. The player can move either by key presses or by clicking on an on-screen keypad.
Task 1: Basic Gameplay - 10 marks
Task 1 requires you to implement a functional GUI-based version of game of Key Cave Adventure Game. To do this you will need to implement some View classes and make appropriate modifications to the Controller class from Assignment 2.
Model classes
Model classes should be defined as per Assignment 2. You may add more modelling classes if they improve the code. You should at least include Entity, Wall, Player, Item, Key, MoveIncrease, Door, and GameLogic. Note that, though we’re now representing these classes with different concepts (e.g. the Door will be represented with a graphical depiction of a nest) you don’t necessarily need to modify these classes to modify how they’re represented in the graphical interface. You may choose to modify the names of the classes if this makes it easier for you to understand, but you won’t need to.
3.2 View Classes
You must implement view classes for the game map and the keypad. However, because these can both be repre sented by grids of rectangles and share a fair amount of functionality, you are required to create an abstract class to factor out this shared functionality. Appendix B outlines methods that may be useful to write in each of these classes. You may add additional methods if they improve the design of your classes.
3.2.1 AbstractGrid
AbstractGrid is an abstract view class which inherits from tk.Canvas and provides base functionality for many of the view classes, as they share a fair amount of common functionality. Namely, they can be thought of as a grid with a set number of rows and columns, and they should all support creation of text at specific positions based on row and column. Though AbstractGrid is an abstract class, if it were to be instantiated, it would be as AbstractGrid(master, rows, cols, width, height, **kwargs) where ‘**kwargs’ signifies that any named arguments supported by tk.Canvas class should also be supported by AbstractGrid. Note that the number of rows may differ from the number of columns.
3.2.2 DungeonMap
DungeonMap is a view class which inherits from AbstractGrid. Entities are drawn on the map using coloured rectangles at different (row, column) positions. You may assume that the number of rows will always be the same as the number of columns for the DungeonMap; i.e. the map is always a square. Your program should work for reasonable dungeon sizes (#rows ∈ [4, 15]). Some entities have their IDs written on their cells (see Figure 1). You must use the create rectangle and create text methods for tk.Canvas to achieve this. You should set the background colour of the DungeonMap instance to light gray by using the kwargs. The DungeonMap class should be instantiated as DungeonMap(master, size, width=600, **kwargs), where size is the number of rows (equal to the number of columns) in the grid, and width is the number of pixels for the width and height of the grid.
3.2.3 KeyPad
KeyPad is a view class which inherits from AbstractGrid, and represents the GUI keypad. Each key is represented as a rectangle created on the KeyPad canvas itself, with text superimposed over it (also created on the KeyPad canvas itself). You must use the create rectangle and create text methods for tk.Canvas to achieve this. The KeyPad class should be instantiated as KeyPad(master, width=200, height=100, **kwargs).
3.3 GameApp
GameApp represents the controller class. This class should manage necessary communication between any model and view classes, as well as event handling. You must also write code to instantiate this class and ensure that the window appears. Give your window an appropriate title, and (as per Figure 1) include a label with the game name at the top of the window. This class should be instantiated as GameApp(master, task=TASK ONE, dungeon name="game2.txt"), where TASK ONE is some constant (defined by you) that allows the game to be displayed as per Figure 1. The dungeon name is the name of the file to load the level from. Though this argument has a default value, all attempted features should work with other reasonable game files.
This CSSE1001: IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.