private void OneStep(Logic.Colors color, Logic.Colors antiColor) { if (!Board.IsClick) { if (!IsClick && Figure != null && Figure.Color == color) { Rect.Fill = Settings.ColorStep; Board.IsClick = true; IsClick = true; Board.XY[0] = CoorY; Board.XY[1] = CoorX; GetClickCells(); } } else { if (IsClick && Figure == null) { GetMoving(); } else if (IsClick && Figure != null && Figure.Color == color) { Rect.Fill = IsFilled ? Settings.ColorOne : Settings.ColorTwo; Board.IsClick = false; IsClick = false; Board.DeleteIsClick(); } else if (IsClick && Figure != null && Figure.Color == antiColor) { if (Board.StepPlayer) { BoardModel.PlayerOne.AddPoints(Figure.Role); } else { BoardModel.PlayerTwo.AddPoints(Figure.Role); } Logic.Figure deadFigure = Figure; GetMoving(); Board.CheckWin(deadFigure); Counter.UpdateCounter(); } } }
public static string GetImage(Roles role, Logic.Colors color) => $"data/Figures/{role}/{color}.png";