Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
davi-bart committed Feb 16, 2024
1 parent bd4264c commit 65738ce
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 35 deletions.
46 changes: 23 additions & 23 deletions src/main/java/it/unibo/controller/resource/ResourceController.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public interface ResourceController {
/**
* Modify the resources of the players into the trade.
*
* @param proposer is the player that propose the trade
* @param accepter is the player that accept the trade
* @param proposedResouces are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
* @param proposer is the player that propose the trade
* @param accepter is the player that accept the trade
* @param proposedResources are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
*/
void tradeWithPlayer(String proposer, String accepter, Map<ResourceType, Integer> proposedResouces,
void tradeWithPlayer(String proposer, String accepter, Map<ResourceType, Integer> proposedResources,
Map<ResourceType, Integer> wantedResources);

/**
Expand Down Expand Up @@ -69,29 +69,29 @@ void tradeWithBank(String proposer, Map<ResourceType, Integer> proposedResources

/**
*
* @param proposer is the player that propose the trade
* @param accepter is the player that accept the trade
* @param proposedResouces are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
* @return wheter the two player involved in the trade have the resources.
* @param proposer is the player that propose the trade
* @param accepter is the player that accept the trade
* @param proposedResources are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
* @return whether the two player involved in the trade have the resources.
*/
boolean canTradeWithPlayer(String proposer, String accepter,
Map<ResourceType, Integer> proposedResouces,
Map<ResourceType, Integer> proposedResources,
Map<ResourceType, Integer> wantedResources);

/***
*
* @param proposer is the player that propose the trade
* @param proposedResouces are the resources that the proposer want to give to
* the
* bank
* @param wantedResources are the resources that the bank want to give to the
* proposer
* @return wheter the proposer and the bank have the resources.
* @param proposer is the player that propose the trade
* @param proposedResources are the resources that the proposer want to give to
* the
* bank
* @param wantedResources are the resources that the bank want to give to the
* proposer
* @return whether the proposer and the bank have the resources.
*/
boolean canTradeWithBank(String proposer, Map<ResourceType, Integer> proposedResouces,
boolean canTradeWithBank(String proposer, Map<ResourceType, Integer> proposedResources,
Map<ResourceType, Integer> wantedResources);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public final class TurnControllerImpl implements TurnController {
private final TurnManager turnManager;

/**
* Constructori of TurnControllerImpl.
* Constructor of TurnControllerImpl.
*
* @param turnManager
*/
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/it/unibo/model/resource/ResourceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public interface ResourceManager {
/**
* Modify the resources of the owners into the trade.
*
* @param proposer is the owner that propose the trade
* @param accepter is the owner that accept the trade
* @param proposedResouces are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
* @param proposer is the owner that propose the trade
* @param accepter is the owner that accept the trade
* @param proposedResources are the resources that the proposer give to the
* accepter
* @param wantedResources are the resources that the accepter give to the
* proposer
*/
void trade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceType, Integer> proposedResouces,
void trade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceType, Integer> proposedResources,
Map<ResourceType, Integer> wantedResources);

/**
Expand Down Expand Up @@ -83,12 +83,12 @@ void trade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceType, Int
*
* @param proposer
* @param accepter
* @param proposedResouces
* @param proposedResources
* @param wantedResources
* @return whether proposer can trade with accepter based on the resources
* provided.
*/
boolean canTrade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceType, Integer> proposedResouces,
boolean canTrade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceType, Integer> proposedResources,
Map<ResourceType, Integer> wantedResources);

/***
Expand All @@ -109,7 +109,7 @@ boolean canTrade(ResourceOwner proposer, ResourceOwner accepter, Map<ResourceTyp
/**
*
* @param playerName
* @return whether the player shold discard cards.
* @return whether the player should discard cards.
*/
boolean shouldDiscard(ResourceOwner playerName);
}
4 changes: 3 additions & 1 deletion src/main/java/it/unibo/model/resource/ResourceOwner.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import java.util.Map;

import it.unibo.common.tile.ResourceType;

/**
* Resource owner.
*/
public interface ResourceOwner {
/**
* Get the default amount of resources of the owner.
* @return a map containing, for each resource, the dafault amount.
*
* @return a map containing, for each resource, the default amount.
*/
Map<ResourceType, Integer> getDefaultResources();
}

0 comments on commit 65738ce

Please sign in to comment.