-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d01b2a
commit 7ad54f2
Showing
18 changed files
with
280 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...opcitizen/TabletopcitizenApplication.java → ...letop/InteractiveTabletopApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package com.codeinspace.tabletopcitizen; | ||
package com.codeinspace.interactivetabletop; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class TabletopcitizenApplication { | ||
public class InteractiveTabletopApplication { | ||
|
||
public static void main(String[] args) { | ||
|
||
SpringApplication.run(TabletopcitizenApplication.class, args); | ||
SpringApplication.run(InteractiveTabletopApplication.class, args); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/com/codeinspace/interactivetabletop/lib/abstracts/EntityBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.codeinspace.interactivetabletop.lib.abstracts; | ||
|
||
import com.codeinspace.interactivetabletop.lib.enums.Type; | ||
|
||
import java.util.Map; | ||
import java.util.UUID; | ||
|
||
public abstract class EntityBase { | ||
private String cDesc; | ||
private String cName; | ||
private Type cType; | ||
private final UUID cUID; | ||
|
||
protected EntityBase(String name, Type type, String desc) { | ||
this.cDesc = desc; | ||
this.cName = name; | ||
this.cType = type; | ||
this.cUID = UUID.randomUUID(); | ||
} | ||
|
||
protected String getUID() { return cUID.toString(); } | ||
|
||
protected String getName() { | ||
return cName; | ||
} | ||
|
||
protected void setName(String name) { | ||
this.cName = name; | ||
} | ||
|
||
protected Type getType() { | ||
return cType; | ||
} | ||
|
||
protected void setType(Type type) { | ||
this.cType = type; | ||
} | ||
|
||
protected String getDesc() { | ||
return cDesc; | ||
} | ||
|
||
protected void setDesc(String desc) { | ||
this.cDesc = desc; | ||
} | ||
|
||
public abstract Map<String, String> details(); | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/codeinspace/interactivetabletop/lib/abstracts/ItemBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.codeinspace.interactivetabletop.lib.abstracts; | ||
|
||
import com.codeinspace.interactivetabletop.lib.enums.Type; | ||
|
||
public abstract class ItemBase extends EntityBase { | ||
/* | ||
* Items stats: | ||
* health | ||
* class | ||
* dimensions | ||
* weight | ||
* volume | ||
* category | ||
* type (equipment, container, consumable, clothing, wearable) | ||
* */ | ||
private int health; | ||
private String itemClass; | ||
|
||
public ItemBase(String name, Type type, String desc, String itemClass, int health) { | ||
super(name, type, desc); | ||
|
||
this.itemClass = itemClass; | ||
this.health = health; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/codeinspace/interactivetabletop/lib/abstracts/LocationBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.codeinspace.interactivetabletop.lib.abstracts; | ||
|
||
public class LocationBase { | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/codeinspace/interactivetabletop/lib/constants/ItemType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.codeinspace.interactivetabletop.lib.constants; | ||
|
||
import com.codeinspace.interactivetabletop.lib.enums.Type; | ||
|
||
public record ItemType(Type type) { | ||
public ItemType(Type type) { | ||
this.type = type; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/codeinspace/interactivetabletop/lib/enums/Type.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.codeinspace.interactivetabletop.lib.enums; | ||
|
||
/** | ||
* Represents an item type. | ||
* @author Brian Blankenship | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
*/ | ||
public enum Type { | ||
WEARABLE, | ||
CLOTHING, | ||
EQUIPMENT, | ||
VEHICLE, | ||
CONSUMEABLE | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/codeinspace/interactivetabletop/lib/exceptions/SameNameValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.codeinspace.interactivetabletop.lib.exceptions; | ||
|
||
/** | ||
* This error is produced when a user tries to to use the same name as the previous when altering | ||
* character name. | ||
* @author Brian Blankenship | ||
* @since 1.0.0 | ||
* @version 1.0.0 | ||
*/ | ||
public class SameNameValue extends Exception { | ||
private static final long serialVersionUID = 5918001787282243528L; | ||
|
||
SameNameValue() {} | ||
|
||
public SameNameValue(String err) { | ||
super(err); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/com/codeinspace/interactivetabletop/utils/Inventory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.codeinspace.interactivetabletop.utils; | ||
|
||
/** | ||
* Global inventory system as a binary tree. | ||
* @author Brian Blankenship | ||
* @since 1.0.0 | ||
*/ | ||
public final class Inventory { | ||
} |
Oops, something went wrong.