ITECH7201 Assignment 2: Geek Games Maze Game Lab 7 Implementation
VerifiedAdded on 2022/11/15
|14
|2214
|399
Practical Assignment
AI Summary
This document presents a comprehensive solution for a Software Engineering assignment focused on developing a text-based adventure game, specifically the "Maze Game" for Geek Games, as part of the ITECH7201 course. The assignment involves implementing functionalities within Lab 7 and 8, in...

Software Engineering
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Game Description
The history of the Maze game and its associated problems can be traced back to the need
for Theseus to eliminate a Minotaur in a Greece Myth. He had to use a thread ball so as to know
which direction will lead him back to the entrance after his case is completed. Our scenario will
assume that in the middle of the maze is a turtle that has to find its way out of the maze (Arora &
Bhatia, 2018).
Despite the simple look of this scenario, the details involved are many. Consider that for
the first iterative step Northward, our next step will be towards the North too. However, should
the northern path be blocked, then we have to change direction and start proceeding southwards.
As we move towards the South, we would be where we were in the first place. With an iterative
process, the turtle will continue to go southward and northward without end (Hendrawan, 2018).
To avoid this, it becomes important to mark where we started from. Based on this, a bag
containing bread crumbs could be kept anywhere we have been. As we move around, whenever
we find bread crumbs, it becomes an indication signifying we should immediately retreat and
move towards another direction. From the code in the algorithm, an iterative function call return
will be required for retreating.
Repeating this algorithm for every time it is needed will lead us to carry out a review for
bases cases. It might have occurred to you from the details in the previous paragraph. For this
algorithm, we can consider 4 basic cases:
When a wall obstructs the turtle. Since the square is being occupied, the space for
continuous exploration is not available.
The turtle enters into a square it has been before. To avoid a repetition that never ends,
we decide to retreat.
1
The history of the Maze game and its associated problems can be traced back to the need
for Theseus to eliminate a Minotaur in a Greece Myth. He had to use a thread ball so as to know
which direction will lead him back to the entrance after his case is completed. Our scenario will
assume that in the middle of the maze is a turtle that has to find its way out of the maze (Arora &
Bhatia, 2018).
Despite the simple look of this scenario, the details involved are many. Consider that for
the first iterative step Northward, our next step will be towards the North too. However, should
the northern path be blocked, then we have to change direction and start proceeding southwards.
As we move towards the South, we would be where we were in the first place. With an iterative
process, the turtle will continue to go southward and northward without end (Hendrawan, 2018).
To avoid this, it becomes important to mark where we started from. Based on this, a bag
containing bread crumbs could be kept anywhere we have been. As we move around, whenever
we find bread crumbs, it becomes an indication signifying we should immediately retreat and
move towards another direction. From the code in the algorithm, an iterative function call return
will be required for retreating.
Repeating this algorithm for every time it is needed will lead us to carry out a review for
bases cases. It might have occurred to you from the details in the previous paragraph. For this
algorithm, we can consider 4 basic cases:
When a wall obstructs the turtle. Since the square is being occupied, the space for
continuous exploration is not available.
The turtle enters into a square it has been before. To avoid a repetition that never ends,
we decide to retreat.
1

The turtle comes out of the maze. The task is completed is the turtle is out of the maze
successfully.
Every part of the square are blocked with a wall (Hoetama, Putri & Winarno, 2019).
Functionalities
The functionalities that result will occur in lab 7
Creation of command parser
It is vital to look for how user input can be stopped prior to starting execution of
command as well as more game functionality. The command format <argument(s)> represent
move west. Therefore, the requirement is breaking user input up from single number string
words. You should then identify commands and arguments. We should visualise the first word
we encountered in the form of input user as a command. The other inputs should be regarded as
argument(s). If you want to make the command parser to be friendlier, you can eliminate words
that are constantly utilized that are not useful arguments or commands (Hojjat, Ikemoto & Sowa,
2017). As opposed to typing go to the north, you could type go north, thus eliminating to the. We
being with class development for representing the analysis of arguments into command and
arguments. The newly created class in the package for Control will be called Parsed Input
(Kambow, 2012).
Create a new class in the package and name it Parser.
Now a class exists for analysing user input, in line with the list of commands as entered
during construction.
Addition of Command control to the class, DungeonMaster
After passing the command as we want to use it. Before this, it is important to carry out
some user interface changes so that retrieval of user command can be accommodated. You can
use the command, GetReply for the purpose of retrieval. Nevertheless, the real technique design
2
successfully.
Every part of the square are blocked with a wall (Hoetama, Putri & Winarno, 2019).
Functionalities
The functionalities that result will occur in lab 7
Creation of command parser
It is vital to look for how user input can be stopped prior to starting execution of
command as well as more game functionality. The command format <argument(s)> represent
move west. Therefore, the requirement is breaking user input up from single number string
words. You should then identify commands and arguments. We should visualise the first word
we encountered in the form of input user as a command. The other inputs should be regarded as
argument(s). If you want to make the command parser to be friendlier, you can eliminate words
that are constantly utilized that are not useful arguments or commands (Hojjat, Ikemoto & Sowa,
2017). As opposed to typing go to the north, you could type go north, thus eliminating to the. We
being with class development for representing the analysis of arguments into command and
arguments. The newly created class in the package for Control will be called Parsed Input
(Kambow, 2012).
Create a new class in the package and name it Parser.
Now a class exists for analysing user input, in line with the list of commands as entered
during construction.
Addition of Command control to the class, DungeonMaster
After passing the command as we want to use it. Before this, it is important to carry out
some user interface changes so that retrieval of user command can be accommodated. You can
use the command, GetReply for the purpose of retrieval. Nevertheless, the real technique design
2
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

entails player questioning. The introduction of another technique to specifically receive player
commands becomes necessary. When we have programmed our client with the ability to receive
user commands, you can now modify DungeonMaster. Presently, the game can understand
commands, instead of exiting, it carries out no action. Furthermore, the class Dungeonmaster
looks messy, thus, requiring reconstruction. This will be addressed next week when the
Command design pattern will be discussed (Kaur & Singh, 2014).
Move Player command execution
The RAD gives an explanation of the Story of the User for Move Party.
Move Party – the player show how they want the movement of the party. Should they
successfully move from one square to the other, their location will be updated in the
system.
In this stage, we have decided the parties to be left out for the story of the user to be rewritten as:
Move Player – the way that the player wants to travel is indicated. Should there be an exit
where the player specified, the player’s location is updated as well as the description of
the location.
Hand-drawn map
3
commands becomes necessary. When we have programmed our client with the ability to receive
user commands, you can now modify DungeonMaster. Presently, the game can understand
commands, instead of exiting, it carries out no action. Furthermore, the class Dungeonmaster
looks messy, thus, requiring reconstruction. This will be addressed next week when the
Command design pattern will be discussed (Kaur & Singh, 2014).
Move Player command execution
The RAD gives an explanation of the Story of the User for Move Party.
Move Party – the player show how they want the movement of the party. Should they
successfully move from one square to the other, their location will be updated in the
system.
In this stage, we have decided the parties to be left out for the story of the user to be rewritten as:
Move Player – the way that the player wants to travel is indicated. Should there be an exit
where the player specified, the player’s location is updated as well as the description of
the location.
Hand-drawn map
3
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

In a maze game development process, the development of the game environment or map
development is a major part. Here the map development process has been completed and the
hand-drawn map is shown below (Meiliana, Septian, Alianto, Daniel & Gaol, 2017). The map
contains six location as well as 2 shops. For map creation, we need to follow two simple rules.
And they are listed below,
M>=5 and N>=2
M>N
The developed map follow these two criteria’s. The map contains six locations (M) and
two shops (N). Hence the solution follows these rules. In the developed Map all the locations are
represented by the symbol “X” and the shops are represented by “(X)”. The starting point is
represented as (S) and the finishing point is represented as (F) (Nagakura, 2008).
Item management
The technique, SetupPlayer, is changed in DungeonMaster. The location’s class is then
adjusted so that it is possible to make an exit. Considering that the location’s class setup now
4
development is a major part. Here the map development process has been completed and the
hand-drawn map is shown below (Meiliana, Septian, Alianto, Daniel & Gaol, 2017). The map
contains six location as well as 2 shops. For map creation, we need to follow two simple rules.
And they are listed below,
M>=5 and N>=2
M>N
The developed map follow these two criteria’s. The map contains six locations (M) and
two shops (N). Hence the solution follows these rules. In the developed Map all the locations are
represented by the symbol “X” and the shops are represented by “(X)”. The starting point is
represented as (S) and the finishing point is represented as (F) (Nagakura, 2008).
Item management
The technique, SetupPlayer, is changed in DungeonMaster. The location’s class is then
adjusted so that it is possible to make an exit. Considering that the location’s class setup now
4

exists for exit retrieval, we can change DungeonMaster class so that player movement
adjustment is accommodated. Change the ProcessPlayerTurn and execute another technique
regarded as processMove within the Dungeon Master.
When the game is executed, type “move west” and observe what happens. When doing
this, the movement of player have been executed in a way that looks crude. You should also
decide on what can be done to enhance it such that it can be better used with some play testing
(for example, creating a ToString approach in your current location such as name and description
of location as well as carrying out the update on both is better than description update only). This
will be an optional further exercise.
The above code is creating the item class. There are two variables are created such as
description and item_name. The item constructor are used in the above code. Getitem_Name()
fuction used to get the item name.
5
adjustment is accommodated. Change the ProcessPlayerTurn and execute another technique
regarded as processMove within the Dungeon Master.
When the game is executed, type “move west” and observe what happens. When doing
this, the movement of player have been executed in a way that looks crude. You should also
decide on what can be done to enhance it such that it can be better used with some play testing
(for example, creating a ToString approach in your current location such as name and description
of location as well as carrying out the update on both is better than description update only). This
will be an optional further exercise.
The above code is creating the item class. There are two variables are created such as
description and item_name. The item constructor are used in the above code. Getitem_Name()
fuction used to get the item name.
5
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

There are five items are created in the above code. The item are animalfood, sancks,
notebook, dress, and food. The animal food item set the zoo location. Snacks set the theater
location. The mall has the various dress. The hotel set the food item.
6
notebook, dress, and food. The animal food item set the zoo location. Snacks set the theater
location. The mall has the various dress. The hotel set the food item.
6
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

The above code shows the lock and unlock the door. Before lock and unlock door we
want the key. So purchase the key item.
Implementations
Execution using recurrent methods
If you have selected your starting point, drag the information into the recurrent method.
For the recurrent technique, you can achieve the following:
Generate 4 random numbers as an int array to represent the path.
Start the loop 4 times
Pick the switch statement to include all the 4 paths
7
want the key. So purchase the key item.
Implementations
Execution using recurrent methods
If you have selected your starting point, drag the information into the recurrent method.
For the recurrent technique, you can achieve the following:
Generate 4 random numbers as an int array to represent the path.
Start the loop 4 times
Pick the switch statement to include all the 4 paths
7

For a path, confirm that the additional cell will fall beyond the maze or is a path that is
opened. If this matches the scenario, then you don’t need to do anything.
However, if that path leads to a wall, adjust the path of the cell and call a repetitive
function that will pass the new current row and column (Prakash Shrivastava, 2012).
Building of Maze
Maze development is a very complex problem. It is very easy to make mistakes when you
do not respect structural rules. 2a) Conceal the complexity of creating a room (CreateMaze)
based on the pattern Builder. Generate a builder for the major game as well as its extension. An
adjusted UML diagram class should be developed and executed (WANG, WANG & LIU, 2009).
You can consider the figure you are creating from different areas. The consideration
could be a number of model parts shown by the different diagrams, but could be different based
on the options for manipulations. Mostly, read-only and mutable views will be existing. As a
result, the creation of activities diagram, statecharts and class models class diagrams will be
carried out. This should contain some of the diagram’s elements for class orders; arrows for their
inheritance and classes, arrows for state and state transition, activities and activity transition
arrows.
Develop the widgets for GUI interpretative factory. Two string parameters is used by the
factor to decide the instantiate class. A parameter known as instance variable and indicate GUI
theme, the other parameter indicates the creation of widget.
8
opened. If this matches the scenario, then you don’t need to do anything.
However, if that path leads to a wall, adjust the path of the cell and call a repetitive
function that will pass the new current row and column (Prakash Shrivastava, 2012).
Building of Maze
Maze development is a very complex problem. It is very easy to make mistakes when you
do not respect structural rules. 2a) Conceal the complexity of creating a room (CreateMaze)
based on the pattern Builder. Generate a builder for the major game as well as its extension. An
adjusted UML diagram class should be developed and executed (WANG, WANG & LIU, 2009).
You can consider the figure you are creating from different areas. The consideration
could be a number of model parts shown by the different diagrams, but could be different based
on the options for manipulations. Mostly, read-only and mutable views will be existing. As a
result, the creation of activities diagram, statecharts and class models class diagrams will be
carried out. This should contain some of the diagram’s elements for class orders; arrows for their
inheritance and classes, arrows for state and state transition, activities and activity transition
arrows.
Develop the widgets for GUI interpretative factory. Two string parameters is used by the
factor to decide the instantiate class. A parameter known as instance variable and indicate GUI
theme, the other parameter indicates the creation of widget.
8
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

User stories for each of the deliverables / milestones
As a player I want to add So that I can
Weapon select and
change feature
Buy and Sell items
To collect money and
other collectibles
Change the weapons
when I was playing.
Sell and buy items on
the game.
Collect money to buy
some boosters etc.
Class diagrams for Lab 7
In the below-given diagram the relationships, as well as dependencies between the
classes, are illustrated. Unified Modeling Language (UML) is used for representing the
relationship between the classes. Here the class describes the methodology used and variable
used present in the object. In Object Oriented Programming class diagrams plays a significant
role.
9
As a player I want to add So that I can
Weapon select and
change feature
Buy and Sell items
To collect money and
other collectibles
Change the weapons
when I was playing.
Sell and buy items on
the game.
Collect money to buy
some boosters etc.
Class diagrams for Lab 7
In the below-given diagram the relationships, as well as dependencies between the
classes, are illustrated. Unified Modeling Language (UML) is used for representing the
relationship between the classes. Here the class describes the methodology used and variable
used present in the object. In Object Oriented Programming class diagrams plays a significant
role.
9
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Sequence diagram
10
10

Contribution
Paired activity First, I and my teammate studied the given
code jointly. And we familiarized on the
given code. Then we studied all the
requirements. Jointly reviewed related
journals and articles. Integrated all the
individual works and developed as a single
functional game. And we jointly developed
the map for the project.
My contribution In this project, my part is to implement the
functionalities of the lab 7. Here I added the
move function, quit function, welcome
11
Paired activity First, I and my teammate studied the given
code jointly. And we familiarized on the
given code. Then we studied all the
requirements. Jointly reviewed related
journals and articles. Integrated all the
individual works and developed as a single
functional game. And we jointly developed
the map for the project.
My contribution In this project, my part is to implement the
functionalities of the lab 7. Here I added the
move function, quit function, welcome
11
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

function and lock & unlock function.
Team mate contribution In this project, my teammate contributed to
implementing the functionalities involved in
lab 8. Here my teammate added help function,
get the item and drop item function and buy
and sell item features.
12
Team mate contribution In this project, my teammate contributed to
implementing the functionalities involved in
lab 8. Here my teammate added help function,
get the item and drop item function and buy
and sell item features.
12
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

References
Arora, P., & Bhatia, R. (2018). Agent-Based Regression Test Case Generation using Class
Diagram, Use cases and Activity Diagram. Procedia Computer Science, 125, 747-753. doi:
10.1016/j.procs.2017.12.096
Hendrawan, Y. (2018). A Maze Game on Android Using Growing Tree Method. Journal Of
Physics: Conference Series, 953, 012148. doi: 10.1088/1742-6596/953/1/012148
Hoetama, D., Putri, F., & Winarno, P. (2019). Algoritma Fisher-Yates Shuffle dan Flood Fill
sebagai Maze Generator pada Game Labirin. ULTIMA Computing, 10(2), 59-64. doi:
10.31937/sk.v10i2.1064
Hojjat, S., Ikemoto, C., & Sowa, T. (2017). Maze and Mirror Game Design for Increasing
Motivation in Studying Science in Elementary School Students. EAI Endorsed Transactions
On Creative Technologies, 4(12), 153155. doi: 10.4108/eai.3-10-2017.153155
Kambow, L. (2012). Transformation of UML Class Diagram to UML Sequence
Diagram. International Journal Of Applied Information Systems, 2(9), 19-22. doi:
10.5120/ijais12-450413
Kaur, M., & Singh, R. (2014). Generation of Test Cases from Sliced Sequence
Diagram. International Journal Of Computer Applications, 97(5), 29-34. doi:
10.5120/17006-7157
13
Arora, P., & Bhatia, R. (2018). Agent-Based Regression Test Case Generation using Class
Diagram, Use cases and Activity Diagram. Procedia Computer Science, 125, 747-753. doi:
10.1016/j.procs.2017.12.096
Hendrawan, Y. (2018). A Maze Game on Android Using Growing Tree Method. Journal Of
Physics: Conference Series, 953, 012148. doi: 10.1088/1742-6596/953/1/012148
Hoetama, D., Putri, F., & Winarno, P. (2019). Algoritma Fisher-Yates Shuffle dan Flood Fill
sebagai Maze Generator pada Game Labirin. ULTIMA Computing, 10(2), 59-64. doi:
10.31937/sk.v10i2.1064
Hojjat, S., Ikemoto, C., & Sowa, T. (2017). Maze and Mirror Game Design for Increasing
Motivation in Studying Science in Elementary School Students. EAI Endorsed Transactions
On Creative Technologies, 4(12), 153155. doi: 10.4108/eai.3-10-2017.153155
Kambow, L. (2012). Transformation of UML Class Diagram to UML Sequence
Diagram. International Journal Of Applied Information Systems, 2(9), 19-22. doi:
10.5120/ijais12-450413
Kaur, M., & Singh, R. (2014). Generation of Test Cases from Sliced Sequence
Diagram. International Journal Of Computer Applications, 97(5), 29-34. doi:
10.5120/17006-7157
13
1 out of 14
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.