This is not ma and pa's old Conway; this is a new, improved, and less confusing version of the classic extension. We hope you enjoy it!Conway's Game of Life is a biology simulation that was developed by British mathematician John Horton Conway in 1970. It is designed to simulate cellular automation by creating an initial configuration of living and dead cells and observing how they evolve. Many interesting patterns have developed from the origins of the original simulation--producing patterns that pulsate, exist into infinity, and even glide like spaceships.
The rules of Conway's Game of life are as follows:
This set of rules can end up making some very interesting patterns. Below we have drawn out some of the patterns that are made by cells in Conway's game of life. Dead cells are represented by white squares, living cells are represented by black squares.
Block
Beehive
Loaf
Boat
Blinker
Toad
Beacon
Pulsar
Glider
Lightweight Spaceship
Gosper Glider Gun
Block-Laying Switch Engine
The code for this work can be found conway package of the extensions source folder. The Conway class is where you will be doing all of your work. ConwayTest is the tester for Conway and Main is what you will run when your code is finished to actually see your work happen. The Main class creates a GUI, Graphical User Interface, which allows you to see cells dying and coming back to life. Open Conway. You will create the following methods:
Your code should now pass the getRowsAndColumnsTest()
It would make sense that if a cell was alive, and it was represented by a boolean, it would be true, and if it was dead it would be false. You must come up with a data type that stores values in rows an columns to represent all of the cells. There are multiple ways to store this information, but think carefully about which one you choose, for this choice could save you time down the road. Just remember; you should not change anything within the test, and you must return what we ask you to return.
Your code should now pass the isAliveTest() and the setLivenessTest().
Your code should now pass the clearTest()
The neighbors of a certain cell are considered to be the eight cells that are surrounding it. Your isAlive() should help you with this.
![]()
If you were to count the number of living neighbors of the living cell in the picture above, you would check the eight white squares that are surrounding it, and see if any of those cells were alive. In this picture, the live cell in the middle has no living neighbors, so according to the rules, it will die of loneliness. So in the next frame it will become a white square. ![]()
This is a random group of cells ![]()
This picture shows the number of living neighbors that each of the cells in the above picture has Once you implement this method, your code should pass the countLivingNeighborsTest()
It might be helpful here to create a next conway object with the same dimensions as the this Conway object. If you change the values of the original Conway object while you still havent determined whether other cells will be alive in the next generation, you might not count the wrong number of living neighbors. For instance, say cell A and cell B both alive, and are neighbors. If you determine that A will be dead in the next generation, and you kill it, when you go to count the number of living neighbors of B, it will have fewer living neighbors now than it should. If you create another Conway object, you can store the liveness of ALL of the cells on that Conway object, and then alter the values of the this Conway object at the end.If a cell will not be alive in the next generation, set it to false. If a cell will be alive in the next generation, set it to true. Make sure to account for all cells, and not just the ones that are currently alive. The rules of the Conway Game of Life are listed at the top of this page. This is where you will implement those rules.
Your code should now pass the stepTest()
There is also an empty public void logAndCapture() method. You do not need to put anything in here right now, this is the subject of the next extension
Once you have completed all the methods, you can run the Main method to play Conway's Game of Life. There are many patterns that can be used to test your simulation, some of which can be found here.
To further debug your code, the visual interface allows you to take one step at a time. If the game is not working, use the debugger or print information helpful to diagnosing the problems you see.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.1
For example, the Four Blinkers code is captured already, but if you were to generate code for it using logAndCapture() the result would look something like this:
The idea is that the code can be copied from the console, pasted into your Conway class, and when you choose the right menu item from the interface, the board will be initialized to replicate what you captured.Beginning of Log and Capture setLiveness(true, 1, 1); setLiveness(true, 1, 2); setLiveness(true, 1, 3); setLiveness(true, 1, 5); setLiveness(true, 1, 6); setLiveness(true, 1, 7); setLiveness(true, 5, 1); setLiveness(true, 5, 2); setLiveness(true, 5, 3); setLiveness(true, 5, 5); setLiveness(true, 5, 6); setLiveness(true, 5, 7); End of Log and Capture
Once you have logAndCapture() working, use this new tool to automatically generate your own Conway patterns in myDesignOne(), myDesignTwo(), and myDesignThree(). For credit for this extension, these patterns should be both intriguing and potentially time-consuming to generate by hand.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.2
To be safe, your instance variable must be a copy of the parameter, so that the contents of your Matrix's array cannot be changed beyond your control.To copy the two-dimensional array, you must instantiate a new two-dimensional array and copy the original array's contents into your new array. Do not use clone. It will only clone the first row of the array, and the rest of the rows will be left empty
The .equals(Object) method included with this lab calls your arraysAreEqual method, so that Matrix equality of two matrices depends on the contents of those matrices.Until this method is working, the rest of the JUnit tests will not work properly.
In this lab, rows are numbered as arrays are indexed. Thus, the top row in the matrix is row 0, and the bottom row is numbered one less than the number of rows in the matrix.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.3
For instance: if we have the system of equations:You can also assume that there will only be one solution to the system of equations that we provide to you.
3x + 10y - 4z = 27 We know that the matrix for the coefficients looks like2x - 3y + 2z = 7
-x - y + z = 0
[3][10][-4] And the matrix for the sums looks like[2][-3][2]
[-1][-1][1]
[27] Since the solution to this particular system of equations is x = 3, y = 5, z = 8, the solutions matrix would look like[7]
[0]
[3] [5]
[8]
NOTE: Your solution to this extension must be a general one. In other words, it cannot be restricted to solving 3x3 (or 3x4 if you count the constants column) matrices. It must be able to solve systems of equations with arbitrary numbers of parameters.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.4
Issues: Move this extension earlier because it's relatively easy from a design and object point of view.
In this extension you will build a golf game where the player can putt the ball into the hole with a mouse click. Your golf game will use the Point and Vector classes you developed in lab.
Make sure to import the correct Point and Vector classes from lab!
- Here is some inspiration.
- Here is a video demonstrating our version of the game.
- And here is a static view of the game before a putt:
![]()
For simplicity, your game will be played on a standard Sedgewick unit canvas, whose x and y coordinates range from 0.0 to 1.0.
In the golf package you will find four classes:
When you have finished writing this class, run the TestGreen unit test.
That is, a Hole can only exist within 0.3 < x, y < 0.7.
When you have finished writing this class, run the TestHole unit test.
The implication of this point on your solution is that the location of a Ball is not final.
When you have finished writing this class, run the TestBall unit test.
One crucial part of this extension is figuring out how to grab the mouse coordinates. Remember that StdDraw has built-in methods you can use to your advantage, namely StdDraw.isMousePressed(), StdDraw.mouseX(), and StdDraw.mouseY().
Hint:
while(!StdDraw.isMousePressed){
//here we know nothing has happened...
}
//mouse must have been pressed here!
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.5
Issues: Needs a careful editing
This lab involves computation over some points of a complex plane.
Recall that a complex number has two components:
a real and an imaginary part.
For each complex point c (which we will display on a cartesian coordinate system) that we want to display, we compute
a function rigor(c). This is an important formula when considering Julia sets, but for this extension, we will use it to compute what color
we will make a certain point.
Code for rigor(c):In other words,Complex z = new Complex(-0.7795, 0.134); int iters = 0; while(c.abs() < 2 && iters < this.IPP) { c = c.times(c).plus(z); iters = iters + 1; } return iters;In this formula, z is a constant that is chosen so that the colors of this Julia set come out a certain way. Once you finish this lab, you can experiment with different values of z to try to find new images.
rigor(c) is the number of iterations
that it takes to compute the value at c.
The value of IPP is arbitrary, but let's assume
for now that
100 iterations are allowed for the computation. The function
abs(z) computes the distance of z from
the complex point (0,0).
The IPP is the Iterations Per Pixel. If you change the IPP, the budget for each pixel will be larger, which means that the code will spend longer computing each point. The rigor(c) function iteratively calculates what color a pixel will be by executing the above code, but sometimes certain points on the complex plane take an arbitrarily large amount of time to measure, so instead of letting your computer run for an arbitrarily large amount of time, you will cap the function when you reach a certain number of iterations.
To show complex numbers on an x-y axis system,
let us assume that the real component of a complex number is registered on
the x-axis; the imaginary component is thus registered on the y axis.
If we apply the above computation over the complex plane as x
ranges from -2 to 2 and y ranges from -2i to 2i,
we obtain the following picture:
(-2, 2i) (0, 2i) (2, 2i)
(-2, 0i)

(2, 0i)
(-2, -2i) (0, -2i) (2, -2i)
Figure 1: Initial display
IPP).
In the figures shown in this write-up, the color of a pixel p is computed as follows, based on the value of iters that was computed for the Complex coordinate associated with p:
Color color = Color.black;
if (iters < this.IPP) {
// If you feel like changing the color, play with this line
color = Color.getHSBColor((iters % 256)/255.0f, 1.0f, 1.0f);
}
StdDraw.setPenColor(color);
//
// Draw a point
//
StdDraw.filledCircle(realCoord, imaginaryCoord, .00001);
The rigor(c) function gives you the value of iters.
You entered a certai complex coordinate c, and this function gives you the color
of that coordinate. So the last line of this code draws a tiny circle at that complex coordinate of the color that was given by the rigor(c) function
The above code uses the HSB color model. For more information,
consult the Color.getHSBColor documentation. The basic idea is to pick a hue based on the number of iterations,
but leave the brightness and saturation at full.
We use those two corners to describe the currently viewed area of the display.Zooming in, zooming out, and the selection of a box all affect those two corners, which in turn frame the display that is shown.
What is really interesting about a fractal drawing is that one can dive into the drawing and discover ever increasing detail. Below you see the results of zooming into the picture.
|
|
||||||||||||||||||
| Zoom in on left part of picture | Another zoom in on left part of picture |
Sedgewick's StdDraw allows you to set the coordinates of the display.
The other zooming methods can accomplish their tasks by calling setCoordinates with the appropriate parameters.
A Cartesian coordinate plane is made up of an infinite number of points. We do not have time to compute the colors of an infinite number of points. Instead, we will take in how many points we need to compute in the constructor. When you draw the picture, you must iterate numRealSamples across the plane and numImaginarySamples down it. So, if numRealSamples = 500 and numImaginarySamples = 300, you will have a total of 500 x 300 = 150,000 samples on the entire plane. Each sample is a complex point. You will pass these points into the rigor(c) function.
The StdDraw.show(0) at the beginning AND the end causes the picture to be drawn faster. It will also help to create a separate private int rigor(Complex c) method that computes the rigor outside of your draw() method, but it is not necessary. If you run the JuliaControler you should now get the picture that is shown at the top of this extension.
You should make sure that the lower left coordinate is (-2, -2i) and the upper right coordinate is (2, 2i) whenever a new Julia object is made. If you run the JuliaControler, the Set Coords Test button, when clicked, should now produce the image shown in the table below.
If you run the JuliaController now, the Zoom In Test should produce the image shown in the table below.
The IPP Test button on the JuliaControler should now draw the image in the table below
Remember the z value that we gave you for the rigor function beforehand? Here are some values of z that will give you interesting designs:These are actually all points on the graph of the Mandelbrot set whicch is a complex graph of Julia sets.
- (-.162, 1.04i)
- (.3, -.01i)
- (-1.47, 0i)
- (-.12, -.77i)
- (.28, .008i)
|
This picture should be the result of you pressing the Test 1 button |
|
This should be the result of you pressing the Test 2 button |
|
This should be the result of you pressing the Test 3 button |
For more information about the Mandelbrot set and Julia sets, try this Youtube video or this web page.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.6
This extension involves your completing some classes that have already been designed. Each class has an API described here and in the class's JavaDoc comments. A JUnit test case is written both to help you create a correct implementation of the design and to demo your work for credit.
Later, the class you will most likely use from this package is TwoDimensionsionalGUI, which helps applications use the current position of the mouse in the Sedgewick drawing panel as a control mechanism.For now, run the provided TwoDimensionalGUIExample and watch the effects of moving your mouse around in the window. This code uses the TwoDimensionalGUI's update() method in an event loop, such as the ones you have seen before that accomplish animation.
Some general guidelines follow:
- Pay attention to the user story told about each class. Recall that each has-a indicates the need for an instance variable.
- Name your variables appropriately, and protect them from access by other classes by declaring them private.
- Where appropriate, include final on the declaration of instance variables, so that their values cannot be changed after the constructor finishes.
- Create meaningful toString() methods. Make sure these do not produce too much information. For example, if a class contains a large array of values, those should not be included in the toString() result. Instead, include the size of the array in the toString() result if it could be useful.
OK, now follow the steps below, in order, to develop the classes for this extension:
A Samples object has-a double array of samples. This constructor takes in such an array, and the constructor must capture the array by making a copy of its values to be retained as an instance variable.
This is a bit unusual: you would normally capture an instance variable val by writing this.val = val, but for an array, that would retain the reference to the array without copying its values. While the reference is sufficient to access the array's values, there is no guarantee that code outside the Samples class won't change the array after the constructor returns.
To guard against this, your constructor must make a copy of the array's values. As a reminder, this involves:
The testConstructor1() test will not pass until you have also completed getNumSamples() and getSample(int i), so once you have completed the constructor, we advise that you complete these two simpler methods before unit testing again.
Run the unit tests, and the testConstructor1() unit test should pass at this point, as well as the getNumSamples() unit test
This constructor also requires getNumSamples() and getSample(int i) to be completed before it will pass testConstructor2
Run the unit tests, and the testMax() and testMin() unit tests should pass at this point.
Run the unit tests, and the testConcat() unit test should pass at this point.
Run the unit tests, and the testCombine() unit test should pass at this point.
Run the PitchTest unit tests, and they should pass at this point.
Run the unit tests, and the testOvertones() unit test should pass at this point.
We could have designed this class to retain the starting pitch as an integer, but with the richer object Pitch we should use it instead.Why?
A Pitch object can easily compute other related pitches, and return its representation as a frequency. We could carry out these computations on any integer, but by having it already programmed in Pitch, we should use that object to avoid code duplication, avoid work, and increase reliability.
| Example in key of C major | Diatonic offset | Chromatic offset from previous diatonic note |
|---|---|---|
| C | 0 | N/A |
| D | 1 | 2 |
| E | 2 | 2 |
| F | 3 | 1 |
| G | 4 | 2 |
| A | 5 | 2 |
| B | 6 | 2 |
| C | 7 | 1 |
Moreover, the getPitch(int) method must accommodate values for its parameter that are negative, zero, or positive, and those values may be outside the range of a single octave.
This is the trickiest method: get help from the TAs or instructor if you need it.
- Run the unit tests for DiatonicScale and they should pass at this point.
- You can also run DiatonicScale as an applicaiton and it should print out some information about some scales.
The other two pitches are 2 and 4 diatonic offsets away from the root.
Use the getPitch(int) method of the specified DiatonicScale to find the root, second, and third SingleTones of this Triad.
Run the unit tests for Triad and they should pass at this point.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.7
You will use the Triad and other classes you have developed to make a simple chord organ that resembles the following:
Your code will be shorter and easier to write if you think through how to represent the 8 keys shown in the GUI. You could use many separate variables, but if you think abstractly, you will use arrays to represent the values of interest.
For the steps of the development described below, however, you must use the specified classes.
DiatonicScale ds = new DiatonicScale(3);This makes a diatonic scale object with high C as its base note.
Triad t = new Triad(ds,i);
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.8
Axis of Awesome needs your help to record their soon-to-be-hit four-chord song.
In this extension, you use the chords.music classes you developed above to create a 4-chord song. The song consists of two Samples of music, background and tune, which are combined throughout to make a song. As the song plays, you can control how much of what you hear is background and how much is tune.
To see how it works
- Run the TwoDimensionalGUIExample and move your mouse in the window to control the size and shading of the displayed circle.
- Read the constructor and the code in the class.
- You can instantiate this class yourself and use it to select the amount of background and tune present in your sound output.
-2 3 0 4
| Chord | Name in C major | Triad |
|---|---|---|
| Six | a minor | new Triad(ds, -2) |
| Four | F major | new Triad(ds, 3) |
| One | C major | new Triad(ds, 0) |
| Five | G major | new Triad(ds, 4) |
The background consists of rotating among the above chords, with each chord playing for one second (a quarter note).
Your challange is to devise a method for randomly breaking a one-second beat into smaller units. The units should not always be the same. For example, one way to divide one second might result in the following, played consecutively:
- 2 eighth-second notes
- 1 eighth-second note
- 2 sixteenth-second notes
- 1 quarter-second note
- 1 quarter-second note
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.9
Issues: Needs work
The first item ever bought with a UPC barcode was a 10-pack of Wrigley's Juicy Fruit chewing gum. It cost 74 cents. While there are several encoding schemes used to produce barcodes, by far the most common is the Universal Product Code (or UPC-A). George J Laurer came up with the design for the Universal Product Code while he was working at IMB in 1973. Your task in this decode a UPC image.
In the extensions folder you should find a package called upc. Open the UPC class inside it. You should see a constructor that takes in a Sedegwick Picture object and a method called getValue(). In order to test your code, you need to decode a barcode image and return the sequence of 12 digits it encodes as a string in the getValues() method. How you go about this is largely up to you. This extension will challenge you to take a large task and break it down into manageable, less intimidating components. To test your code when you are finished, run the TestUPC class in the upc package.
Note: For this extension, you need only consider left-to-right scans. Further, the data you will be provided with in the JUnit test is error free. This means that any trouble you have deciphering the 12-digit signature will not come as a result of the barcode image itself.
Below are some important points about UPC encoding that you may find useful. If you have any more questions, the Wikipedia link in the introduction of this extension is an excellent resource.
Hint: You will likely find the start sequence to be particularly useful in decoding the UPC for this extension.
To get you started, here are some tips. There are three essential parts to your task ahead:
How you accomplish these tasks is up to you, but creating additional classes to make your life easier is strongly advised. You are given a UPC Object; what other Objects might be useful in this task?
Hint: You might consider creating classes to handle pieces of the larger task so you can test as you go.
In the upc package is also a UPCUtil class. You are free to modify this class as you see fit. Inside it is a public int[][] digits that stores 10 integer arrays representing the UPC encoding of digits 0 through 9. The index of the array in digits tells you what digit the sequence of bar lengths therein represents.
digits[3] = {1,4,1,1} tells you that the digit "3" is encoded in a UPC by 4 bars of length 1-4-1-1
This information will be necessary for step three as described above. All of this information is also available in the hyperlink in the introduction.
You may find that you want to use the GenUPC class to test parts of your code before you are ready for the unit test. You can do so as follows:
GenUPC gen = new GenUPC(4); String key = gen.genRandomUPC(); Picture pic = gen.genPic(key);
Here, the key is the 12-digit signature of the barcode and pic is the Picture that gets passed into the UPC class. To view the barcode image, use the .show() method of the Picture Object. The integer input in the GenUPC class indicates the number of pixels per module in the image to be generated.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.10
Issues: Needs work
It's strongly recommended that you complete extension 7.10 before doing this extension. If you start from scratch, you will complete extension 7.10 in the process of doing this extension.
Your task in this extension is to build on what you have already done in extension 7.10, Barcode Scanner. In the datafiles folder is a barcode folder full of JPEG images of barcodes. Have a look at some of them. You should notice that they are not a nice as the barcodes you had to deal with in the first barcode extension; they are blurry and some of them are warped by curved surfaces. Your task is to modify your code so that it can deal with blurry images, as well as upside-down images. You may find that you want to create a main file to test your code as you work. The UPC class has an empty constructor (public UPC()) that will pop up a window in which you can choose what JPEG image you want to use as your input picture. In the barcodes folder there are also three "mystery" barcodes with the signatures cropped out. Once you finish this extension, you should be able to decipher them and then you can search here to find out what the signature represents.
Your first task is to modify your code to deal with blurry images. To do this, we are going to use a concept from image processing called thresholding. This basically involves pushing each pixel to white or black based on its brightness (or intensity henceforth). The intensity of a color is related to the strength of its red, green, and blue components. Recall that white is the composition of all colors and black is the absence of color. (If you completed the image processor extension, have a look at the grayscale method...).
Note: how you choose to represent white and black after thresholding is up to you. It will be helpful to choose a representation that is compatible with your choices from the first extension. Also, it will be very helpful to incorporate a parameter to serve as coefficient for the thresholding bound. By this I mean that to use the idea of thresholding, you need to compute a value that lies on the threshold between white and black. You need to have a default threshold, but you want to be able to modify this threshold with an input parameter. This is because sometimes the default bound won't eliminate all of the error, and you will want to try another one.
Once you have thresholding implemented, you should be able to find the digits and compute their values using your previously implemented code, but how do you know if the signature you find is correct? First you want to check that all of the digits that you discovered have the same parity and that they consist of seven modules. The parity of a digit is a way of determining if it was read from left to right, or vice-versa; if the sum of bar-lengths of the 1st and 3rd bars in a module is odd, then (assuming the digit is correct) it was scanned from left-to-right. Finally, you want to check the barcode using the check digit, or the last digit in the 12-digit UPC signature. The check digit is computed as follows:
Now that you have the ability to detect error in your barcode reads, how do you fix the problem? Recall that in an actual barcode scanner, you need to keep waving the item in front of a laser until there is a beep, meaning that if there is an error, there is a re-scan. How you deal with error is up to you, but it's recommend that you re-read the data with a different threshold if the error too substantial to easily deal with.
Hint: if you are reading across the pixels of the image at a specific height, consider making that height variable (just like the threshold) so that you can vary the scan-height when you re-scan as well.
Once this is complete, the generatedWithError() test in the ImperefectDataTest class should pass.
After the thresholding modifications, the TestUPC JUnit test from the previous extension should still be passing. If it isn't, you should focus on getting that working before moving on to the imperfect data testing.
Your final task is to modify your code so that it can read barcodes that are upside-down as well (note that this is the same as a right-to-left scan). There are a variety of different ways to go about this, and it's up to you to decide what to do.
At this point, the files() test in the ImperefectDataTest class should pass as well.
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.11
Issues: Not yet ready
The roguelike genre of video games has exploded in popularity in recent years. The spirit of the roguelike genre lies in the random generation of elements which provide a fresh gameplay experience during any given play session. Gameplay elements like procedurally generated environments, permadeath, and randomly placed items and enemies have been implemented time and time again in such critically acclaimed games as Spelunky, The Binding of Isaac, and Don't Starve.
In this extension you will build a roguelike in the style of old-school ASCII
games. An ASCII game is one where all of the game elements are represented by characters, a la Dwarf Fortress.
Don't worry, we won't be attempting to approach the complexity of Dwarf Fortress in this game.
The rules of this roguelike are as follows:
In the roguelike package you will find five classes:
When you done with this extension, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches
- If you request propagation, it does not happen immediately, but should be posted in the next day or so
This demo box is for extension 7.12