Table of Contents

Class PawnRuleMove

Namespace
CodeBase.Patterns.Example
Assembly
4Experience.CodeBase.Patterns.Samples.dll
public class PawnRuleMove : IRuleMove
Inheritance
PawnRuleMove
Implements
Extension Methods

Properties

CurrentPawn

private Pawn CurrentPawn { get; set; }

Property Value

Pawn

PawnCollection

private Pawn[,] PawnCollection { get; set; }

Property Value

Pawn[,]

TargetXPosition

private int TargetXPosition { get; set; }

Property Value

int

TargetYPosition

private int TargetYPosition { get; set; }

Property Value

int

Methods

ChangeDeltaMove(int)

private int ChangeDeltaMove(int deltaMoveX)

Parameters

deltaMoveX int

Returns

int

CheckIfOtherPawnIsOnPath()

private bool CheckIfOtherPawnIsOnPath()

Returns

bool

TryMove(Pawn, Pawn[,], int, int)

public bool TryMove(Pawn currentPawn, Pawn[,] pawnCollection, int targetX, int targetY)

Parameters

currentPawn Pawn
pawnCollection Pawn[,]
targetX int
targetY int

Returns

bool