Answered You can hire a professional tutor to get the answer.

QUESTION

Dear tutor, There are a set of questions that should be implemented on this project(based on Java). The instructions are as follow:

Dear tutor,

There are a set of questions that should be implemented on this project(based on Java). The instructions are as follow:

First Level

A grid represents a field, have the cells drawn in different colours to represent the different surfaces that could be present. You should show four (4) different surfaces: brown dirt, light green grass, dark green trees and grey rocks. You can use just a single colour in the cell, you don't need to make it look like that surface. Each cell should be randomly assigned a surface upon its creation (constructor call).You may not change the signature of the Cell constructor from public Cell(int x, int y, int size) public Cell(int x, int y). This restriction means you will have to decide the surface type within the Cell constructor.

Second Level

Note: Put the first level code into a separate class called PassCell. That class won't be used but must not prevent compilation (i.e. it needs to compile but not run).

Instead of using the private field in the Cell class, make surface sub-class of Cell with an overridden paint method. This means you make four new classes, each of which will extend Cell. You won't be able to decide on the type of a cell in the Cell constructor anymore because you won't ever construct a Cell anymore, only one of the subclasses. Thus, you will need to find another place to make this decision

Third level

Is the Credit solution better or worse than the Pass solution? Why? please explain yourself well.

Last level:

The terrain does not look very natural because surfaces don't just appear randomly. Find a better way to allocate surfaces that creates natural looking terrain. The terrain should still be procedurally generated so that each run of the program has different terrain, but it should be more like real terrain. If you need inspiration, read this blog from the developers of Civilisation. Please include a ABOVE_AND_BEYOND.md file explaining how your algorithm works and where you found it (if you implemented an existing algorithm).

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question