diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Purchase.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Purchase.java index e69de29..717c73c 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Purchase.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Purchase.java @@ -0,0 +1,31 @@ +package edu.ntnu.idi.idatt2003.g40.mappe; + +/** + * Purchase represents purchases the player commits. + * + *

Extends {@link Transaction}

+ * + * */ +public class Purchase extends Transaction { + + /** + * Constructor. + * + * @param share the {@link Share} object to purchase. + * @param week the week to purchase during. + * @param calculator the {@link TransactionCalculator} object to calculate this purchase. + * */ + public Purchase(final Share share, final int week, final TransactionCalculator calculator) { + super(share, week, calculator); + } + + /** + * Commits the purchase. + * + * @param player the {@link Player} object performing the purchase. + * */ + @Override + public void commit(final Player player) { + commited = true; + } +}