Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ppn 0.2.2 (development)
=======================

* No user-facing changes.
Bug fixes and minor improvements
--------------------------------

* Eliminated use of deprecated `ppdf` functions.

ppn 0.2.1
=========
Expand Down
12 changes: 6 additions & 6 deletions R/parse_moves.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ standardize_piece_spec <- function(piece_spec) {
if (!is.na(piece <- str_extract(x, character_class(c(unicode_chess_pieces))))) {
rank <- ppdf::chess_rank(piece) + 1L
if (!str_detect(x, "[RKGBYW]")) {
suit <- ppdf::chess_suit(piece)
suit <- ppdf::piece_suit(piece)
}
if (!is.na(angle)) {
angle <- (angle + ppdf::chess_angle(piece)) %% 360
angle <- (angle + ppdf::piece_angle(piece)) %% 360
} else {
angle <- ppdf::chess_angle(piece)
angle <- ppdf::piece_angle(piece)
}
cfg <- getOption("ppn.default_chess_cfg", "chess2")
# Turn into bit
Expand All @@ -226,12 +226,12 @@ standardize_piece_spec <- function(piece_spec) {
} else {
x <- gsub(tile, "", x)
}
rank <- ppdf::domino_rank(tile) + 1L
rank <- ppdf::piece_rank(tile) + 1L
suit <- ppdf::domino_suit(tile) + 1L
if (!is.na(angle)) {
angle <- (angle + ppdf::domino_angle(tile)) %% 360
angle <- (angle + ppdf::piece_angle(tile)) %% 360
} else {
angle <- ppdf::domino_angle(tile)
angle <- ppdf::piece_angle(tile)
}
if (!is.na(col <- str_extract(x, "[RKGBYW]"))) {
x <- gsub(col, "", x)
Expand Down
Loading