Skip to content

Commit

Permalink
Add Transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Solveig Natvig committed Feb 28, 2026
1 parent 7df9db2 commit ffe1266
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/Transaction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
public abstract class Transaction {
private Share share;
private int week;
private TransactionCalculator calculator;
protected boolean committed;

protected Transaction(Share share, int week, TransactionCalculator calculator) {
this.share = share;
this.week = week;
this.calculator = calculator;
}

public Share getShare() {
return this.share;
}

public int getWeek() {
return this.week;
}

public TransactionCalculator getCalculator() {
return this.calculator;
}

public boolean isCommitted() {
return this.committed;
}

public abstract void commit(Player player);

}

0 comments on commit ffe1266

Please sign in to comment.