Skip to content
Snippets Groups Projects

Docs: Added javadoc for ChaosGameDesciption class

Merged Tam Minh Le requested to merge task.2.1 into dev
1 file
+ 32
0
Compare changes
  • Side-by-side
  • Inline
@@ -5,26 +5,58 @@ import edu.ntnu.idatt2003.mappevurderingprog2.models.Vector2D;
@@ -5,26 +5,58 @@ import edu.ntnu.idatt2003.mappevurderingprog2.models.Vector2D;
import java.util.List;
import java.util.List;
 
/**
 
* The ChaosGameDescription class represents a description of a chaos game.
 
* It contains a list of transforms, and the minimum and maximum coordinates of the game area.
 
*/
public class ChaosGameDescription {
public class ChaosGameDescription {
 
 
// The minimum of the x and y coordinates of the game area
private Vector2D minCoords;
private Vector2D minCoords;
 
 
// The maximum of the x and y coordinates of the game area
private Vector2D maxCoords;
private Vector2D maxCoords;
 
// The list of transforms
private List<Transform2D> transforms;
private List<Transform2D> transforms;
 
/**
 
* Constructs a ChaosGameDescription object with the given list of transforms
 
* and the minimum and maximum coordinates.
 
 
* @param transforms the list of transforms
 
* @param minCoords the minimum of the x and y coordinates of the game area
 
* @param maxCoords the maximum of the x and y coordinates of the game area
 
*/
public ChaosGameDescription(List<Transform2D> transforms, Vector2D minCoords, Vector2D maxCoords) {
public ChaosGameDescription(List<Transform2D> transforms, Vector2D minCoords, Vector2D maxCoords) {
this.minCoords = minCoords;
this.minCoords = minCoords;
this.maxCoords = maxCoords;
this.maxCoords = maxCoords;
this.transforms = transforms;
this.transforms = transforms;
}
}
 
/**
 
* Gets the list of transformations associated with the chaos game.
 
 
* @return the list of transforms
 
*/
public List<Transform2D> getTransforms() {
public List<Transform2D> getTransforms() {
return transforms;
return transforms;
}
}
 
/**
 
* Gets the minimum of the x and y coordinates of the game area.
 
 
* @return the minimum of the x and y coordinates
 
*/
public Vector2D getMinCoords() {
public Vector2D getMinCoords() {
return minCoords;
return minCoords;
}
}
 
/**
 
* Gets the maximum of the x and y coordinates of the game area.
 
 
* @return the maximum of the x and y coordinates
 
*/
public Vector2D getMaxCoords() {
public Vector2D getMaxCoords() {
return maxCoords;
return maxCoords;
}
}
Loading