Class: Trade

Trade

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
Source:

Methods

cancelTrade() → {void}

Add the objects back to their respective players
Source:
Returns:
Type
void

completeTrade() → {void}

Execute the trade and swap the players' items
Source:
Returns:
Type
void