Building a road with no structures around its points throws a nullPointerException #34

Closed
opened 2021-12-08 19:37:48 +00:00 by costajon · 0 comments
costajon commented 2021-12-08 19:37:48 +00:00 (Migrated from github.zhaw.ch)

Description

When a player tries to place a road on Points that don't have any settlements or cities a nullPointerException is thrown.

Steps to reproduce

  • Start main in App
  • Enter two (2) players
  • Set settlement at 3, 3
  • Set road at 7, 3 and 8, 3

Cause

SiedlerBoard.getCorner() returns null. Likely because whatever method calls it, can't find any Points that the player owns and that is currently being built on.

Impact/Severity

High severity
Additionally, the following tests cannot complete because of this bug:

  • requirementPlayerResourceCardStockPlayerOneReadyToBuildFifthSettlement
  • requirementBuildRoad
  • requirementBuildSettlement
  • requirementTwoSettlementsSamePlayerSameFieldResourceCardPayout
## Description When a player tries to place a road on Points that don't have **any** settlements or cities a `nullPointerException` is thrown. ## Steps to reproduce - Start main in `App` - Enter two (2) players - Set settlement at 3, 3 - Set road at 7, 3 and 8, 3 ## Cause `SiedlerBoard.getCorner()` returns null. Likely because whatever method calls it, can't find any Points that the player owns and that is currently being built on. ## Impact/Severity **High severity** Additionally, the following tests cannot complete because of this bug: - `requirementPlayerResourceCardStockPlayerOneReadyToBuildFifthSettlement` - `requirementBuildRoad` - `requirementBuildSettlement` - `requirementTwoSettlementsSamePlayerSameFieldResourceCardPayout`
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SlothBusters/gruppe02-slothbusters-projekt3-catan#34
No description provided.