API Docs for:
Show:

domestic.DomesticController Class

Constructor

domestic.DomesticController

(
  • view
  • waitingView
  • acceptView
  • clientModel
)

Parameters:

Methods

acceptTrade

(
  • willAccept
)

Finalizes the trade between players

Parameters:

  • willAccept Boolean

Returns:

void

decreaseResourceAmount

(
  • resource
)

Decreases the amount to send or receive of a resource

Parameters:

  • resource String

    ("wood","brick","sheep","wheat","ore")

Returns:

void

increaseResourceAmount

(
  • resource
)

Increases the amount to send or receive of a resource

Parameters:

  • resource String

    ("wood","brick","sheep","wheat","ore")

Returns:

void

sendTradeOffer

()

Sends the trade offer to the accepting player

Returns:

void

setPlayerToTradeWith

(
  • playerNumber
)

Parameters:

  • playerNumber Int

    the player to trade with

Returns:

void

setResourceToReceive

(
  • resource
)

Parameters:

  • resource String

    the resource to receive ("wood","brick","sheep","wheat","ore")

Returns:

void

setResourceToSend

(
  • resource
)

Parameters:

  • resource String

    the resource to send ("wood","brick","sheep","wheat","ore")

Returns:

void

unsetResource

(
  • resource
)

Parameters:

  • resource String

    the resource to clear ("wood","brick","sheep","wheat","ore")

Returns:

void