From eda9a86d8d48758e9982cfffd470c3b38a0a4b0b Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Sat, 21 Nov 2020 23:11:43 -0500 Subject: Make dice generic Convert dice from dealing exclusively with ints, to deal with objects of arbitrary types --- .../java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dice/src/example/java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java') diff --git a/dice/src/example/java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java b/dice/src/example/java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java index a4a9104..551c0e9 100644 --- a/dice/src/example/java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java +++ b/dice/src/example/java/bjc/dicelang/neodice/statements/DiePoolStatementValue.java @@ -7,11 +7,13 @@ import java.util.*; import bjc.dicelang.neodice.*; public class DiePoolStatementValue extends StatementValue { - public final DiePool value; + public final Type elementType; + public final IDiePool value; - public DiePoolStatementValue(DiePool value) { + public DiePoolStatementValue(Type elementType, IDiePool value) { super(DIEPOOL); + this.elementType = elementType; this.value = value; } -- cgit v1.2.3