29 lines
No EOL
681 B
Java
29 lines
No EOL
681 B
Java
package de.sus.world;
|
|
|
|
/**
|
|
* Implements the map's fields
|
|
* @author Michael Rodin
|
|
* @version 2025-06-10
|
|
*/
|
|
public class Field {
|
|
/** The type of resource this field provides */
|
|
private Resource type;
|
|
/** The rolled number the field activates on */
|
|
private int rollnumber;
|
|
|
|
/**
|
|
* Constructor
|
|
* @author Michael Rodin
|
|
* @param type the field's type
|
|
* @param number the number that needs to be rolled to be activated
|
|
*/
|
|
public Field(Resource type, int number) {
|
|
this.type = type;
|
|
this.rollnumber = number;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return this.type + " " + this.rollnumber;
|
|
}
|
|
} |