first commit
This commit is contained in:
commit
56d08a6a6c
9 changed files with 214 additions and 0 deletions
29
src/de/sus/world/Field.java
Normal file
29
src/de/sus/world/Field.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
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;
|
||||
}
|
||||
}
|
Reference in a new issue