In this assignment is introductory, helping you gain familiarity with the basics of Java, but doing so in the context of slightly larger piece of code. Most of the assignment is composed of a series of small tasks.
The assignment is worth 5% of your total assessment, and it will be marked out of 5. However, these marks are redeemable by the exam, so if your exam mark / 20 is higher than your assignment one mark, you will get the exam mark / 20 rather than the assignment one mark. The mark breakdown is described on the deliverables page.
The assignment is due at 10:45am Friday Week 3, 9 August 2019 (time remaining). You can find this deadline on the deliverables page, where all assignment deadlines for this semester are listed. Your tutor will mark your assignment by accessing your GitLab repository, so it is essential that you carefully follow instructions for setting up and maintaining your repository. You will be marked according to whatever is committed to your repository at the time of the deadline. Since the first assignment is redeemable, late extensions are not offered and will not be given. As always, throughout the course, if some significant circumstance arises outside of the course that affects your capacity to complete the course, please carefully follow the ANU’s special consideration process, and your circumstances will be accounted for in your final assessment.
The game is played by rotating and placing six 1×2-sized tiles on a 3×4 grid. Each tile includes one to three paths, which connect its nearby tiles to each other or the borders. Also, there is exactly one green or red dinosaur on each tile.
The game comprises six 1×2 playing tiles, which we encode using characters a to f . Each tile can be rotated at 90 degree increments, allowing for 4 different orientations (North, East, South and West). The following illustration shows all 24 possible combinations of the 6 pieces and 4 orientations.
The assignment is based on a simple children’s puzzle called DINOSAURS – MYSTIC ISLANDS , made by SmartGames, a producer of educational games. The design of the game and all of the imagery in this assignment comes from their DINOSAURS game.This is objective 1 from the original board game, and is easy to solve. The placement of the three green dinosaur tiles has been specified, so the challenge for the player is just to work out how to place the red dinosaur tiles correctly.
The game is successfully completed once all six tiles are placed and the objective is met.
The game comes with 80 pre-defined objectives, organized as four difficulty levels from starter to master.
Each time the game is played, the objective may be different. Some objectives are easier to solve than others. The game is designed so that the player may specify a difficulty level. In the real game there are four difficulty levels, each with twenty different possible objectives. In our version, the user may select the level of difficulty on a slider.
The images below show a possible progression of the above sample objective. Note that the placement of the three green dinosaur tiles is given in the objective, so the player would normally place those pieces first, however, the order in which they are placed is unimportant. The challenge for the player in this particular case is just how to place the red dinosaurs in such a way as to satisfy the objective (since the location of the three green dinosaurs was already given to the player, in the objective).Locations
In our game we encode locations as (x, y) coordinates that refer to the points on the board where corners of tiles may be located. There are twenty such locations, (0,0) through to (4,3) , as shown here:
All game objectives comprise islands that are created by joining some number of island centers, by appropriately placing tiles. There are exactly ten island centers: seven centered on the board perimeter, thus visible on the outside of the board, and another three in the middle of the board (these island centers only become visible once tiles are placed). The ten island centers are at locations (0,0) , (2,0) , (4,0) , (1,1) , (3,1) ,
(0,2) , (2,2) , (4,2) , (1,3) , and (3,3) , as shown in the figure below:the following pairs of island centers are directly connected:
and , and , and , and , and ,
An island connection is encoded as a pair of character tuples, each tuple representing one of the island centers.
For example, in the connection between and (1,1) , (0,0) is encoded as “00” , and (1,1) is encoded as “11” , and the connection can be encoded as either “0011” or .
All direct connections in the sample objective can be encoded as “001120111102112231424233” , which is a concatenation of six direct island connections.
Notice that indirect connections are not encoded. For example, in the above objective, there is an indirect connection between (0,0) and (2,0) through island center (1,1) , but this indirect connection is not encoded since only direct connections are included in the encoding.
Encoding of Tile Locations
The location of a tile is encoded as a four-character string, as follows:
0. The tile ID: a to f
1. The x-coordinate of the top-left corner: to
2. The y-coordinate of the top-left corner: to 2 3. The orientation of the tile: or
Encoding of Starting State
A challenge may start with some pre-placed tiles. For example, in the above sample objective, the location of the tiles with green dinosaurs is given to the player as part of the objective.
The starting state is encoded as the concatenation of four-character tile location strings. Thus the three green dinosaur tiles prescribed in objective 1, above can be encoded as “b00We01Sd11N” , corresponding to concatenation of three tile placements: “b00W” , “e01S” , and
“d11N” . Your task
Unfortunately your version of the assignment has some missing code. While the graphical user interface is complete, some of the important logic is missing, so it won’t work as described above. It is your job to fix the problems, each identified by a FIXME comment in the source code, so that the code works. Do not change the code except by following each of the assigned tasks. When those tasks are completed, the game will function correctly. Check your changes by using the provided unit tests.
Legal and Ethical Issues
First, as with any work you do, you must abide by the principles of honesty and integrity. I expect you to demonstrate honesty and integrity in everything you do.
In addition to those ground rules, you are to follow the rules one would normally be subject to in a commercial setting. In particular, you may make use of the works of others under two fundamental conditions: a) your use of their work must be clearly acknowledged, and b) your use of their work must be legal (for example, consistent with any copyright and licensing that applies to the given material). Please understand that violation of these rules is a very serious offence. However, as long as you abide by these rules, you are explicitly invited to conduct research and make use of a variety of sources. You are also given an explicit means with which to declare your use of other sources (via originality statements you must complete). It is important to realize that you will be assessed on the basis of your original contributions to the project. While you won’t be penalized for correctly attributed use of others’ ideas, the work of others will not be considered as part of your contribution. Therefore, these rules allow you to copy another student’s work entirely if: a) they gave you permission to do so, and b) you acknowledged that you had done so. Notice, however, that if you were to do this you would have no original contribution and so would receive no marks for the assignment (but you would not have broken any rules either).
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: [email protected] 微信:dmxyzl003