Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 5.58 KB

F16_lab03.md

File metadata and controls

58 lines (47 loc) · 5.58 KB

Tenzing S. and Zizhuo Lin a) The project we are working on is a simulation of Towers Of Hanoi. The simulation has two different versions. One version is based on an ASCII version and
the other is based on a GUI version.

b)As a user of this program I am able to play a game of towers of hanoi in either an ASCII version of the game or a graphical user interface version of the
game in a successful manner. As a user of this game I can give the program a certain amount of disks that I want and then the program returns the correct am
ount of disks and displays them on the screen. I am able to move the disks one at a time from one row to another. There are three rows in this game and the
objective is to get all the disks from row one to row three in the same order you are given.

c) The software that we are given runs perfectly fine. What the software does is that you can give two different commands for it to play a certain version.
To play the ASCII version of the game you can type "ant run" which just simply runs the program in an ASCII format. To play the GUI version you type ant run
-GUI which enables you to run a graphical user interface version of the game towers of Hanoi. Both versions first ask the user how many disks they want. The
more disks you add the more challenging the game becomes. The amount of disks you can put in is at least 3 disks or at most 25 disks. While the user is pla
ying the game music starts to play. This makes the game more enticing for the user. In result to beating the game you are given a window that asks you if yo
u want to replay the game or quit the game on the GUI version. On the ASCII version once you beat the game you are automatically gone to a quit stage.

d)As a player, I can drag and drop the disk so that I know which disk I am moving. As a player, I can see a leaderboard for the shortest time from precedent players so that I am motivated to break the record.

e) The README.md file is written very well. The description of how to set the game up is well written. The screenshots taken give the user a better understa
nding of what happens during the game. One thing that the writer missed on the README is describing what happens after the ASCII version of the game comes t
o a complete end. Another thing the writer missed is explaining the objective of the game and how you can complete the objective. Along with these other tas
ks I would have written a finals remarks on what were the challenging part of the project and what the easy parts were.

f)All targets run well on the build.xml except for the test target. When the you "ant test" you are given back a build failed error. It says that a temp fil
e was unable to be created on the repository. Also for ant javadoc usually when a javadoc file is not created the build.xml creates a new javadoc file for y
ou. Need to make that as well.

g)There are enough issues on this program to receive up to 1000 points however I believe that we should add in a couple of extra issues so that just in case
we cannot complete all issues mentioned on Github on the issues page.

h) Some issues that could be added on are like a help button where you need an instructional guide during the game. link: https://github.com/UCSB-CS56-Proje\ cts/cs56-games-towers-of-hanoi/issues/54

Expand the coverage of the test to include the GUI components of the code. link: #53

i) The code is organized in three different directory, one for basic state of the tower named “model”, one for the GUI version of the game named “utility” a
nd one for the ASCII version of the game “named” view. The class and methods of the TowerOfHanoiState are clear with the comments before each methods. However, in the utilty directory, the methods for the GUI ve
rsion of the game are not described by comments and required the next programmer to look through the code to find the meaning of the funtion. Although there is not enough comments to explain the organization of the code, the basic structure of the GUI version of the game is clear. The code is easy to read and understand if the next programmer figure out the organization of the code. “one screenful of text” to help that programmer get up to speed quickly: model/TowersOfHanoiState.java contains the core of the game including a construtor, using ArrayList to store the status of the tower, and methods t
o move the disks, determine whether the move is legal, determine whether the game is solved, and draw the ASCII version of the game. model/TowersOfHanoiStateTest.java contains the JUnitTest for the main parts of the game, showing whether the constructor and methods in TowersOfHanoiState.j
ava works properly. utility/GUIMain.java is the main class to launch the GUI version of the game. GameGUI.java manage the Timer and the GamePanel. GamePanel.java draws the towers and disks on each tower, and it also contains buttons to move the disks from tower to tower. HanoiTimer.java provides a timer class that will begin running as soon as it is created. HanoiTimerGUI.java draws the GUI for the timer. view/CmdLineHanoi.java allows the game to run in command-line interface with user input.

j)The test cover the constructor and methods of TowersOfHanoiState.java which is the main part of the game, using the JUnit test. However, the GUI utility c
ode is not tested. We can create another test to test each component of the GUI utility such as the GamePanel and the HanoiTimer using the Junit test. This
will be a new test file, and we need to change the build.xml to make a new target to run this test apart from TowersOfHanoiStateTest.