new Trade(proposingPlayer, answeringPlayer, proposingPlayerItems, answeringPlayerItems)
A Trade class
Parameters:
Name | Type | Description |
---|---|---|
proposingPlayer |
Player | The player starting the trade |
answeringPlayer |
Player | The player responding to the trade |
proposingPlayerItems |
Dictionary | The proposing player's items in the trade |
answeringPlayerItems |
Dictionary | The answering player's items in the trade |
Methods
cancelTrade() → {void}
Add the objects back to their respective players
Returns:
- Type
- void
completeTrade() → {void}
Execute the trade and swap the players' items
Returns:
- Type
- void