Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rs22 committed Dec 16, 2023
1 parent 32ecf11 commit 94e786c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Point/Point.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ private void SetPointState(GenericPointPosition pointPosition, GenericDegradedPo
/// </summary>
private void UpdatePointState(GenericPointPosition commandedPointPosition)
{
GenericPointPosition newPointPosition = _pointState.PointPosition;
GenericDegradedPointPosition newDegradedPointPosition = _pointState.DegradedPointPosition;
(newPointPosition, newDegradedPointPosition) = HandlePreventedPointPosition(commandedPointPosition);
var (newPointPosition, newDegradedPointPosition) = HandlePreventedPointPosition(commandedPointPosition);
(newPointPosition, newDegradedPointPosition) = HandleAbilityToMove(newPointPosition, newDegradedPointPosition);
SetPointState(newPointPosition, RespectAllPointMachinesCrucial(newDegradedPointPosition));
}
Expand Down Expand Up @@ -303,10 +301,9 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
/// <param name="degradedPointPosition"></param>
private (GenericPointPosition PointPosition, GenericDegradedPointPosition DegradedPointPosition) HandlePreventedPointPosition(GenericPointPosition commandedPosition)
{
GenericPointPosition pointPosition = _pointState.PointPosition;
GenericDegradedPointPosition degradedPointPosition = _pointState.DegradedPointPosition;
var pointPosition = commandedPosition;
var degradedPointPosition = _pointState.DegradedPointPosition;

pointPosition = commandedPosition;
switch (_simulatedPointState.PreventedPosition)
{
case PreventedPosition.PreventedLeft:
Expand Down

0 comments on commit 94e786c

Please sign in to comment.