Skip to content

Commit

Permalink
pokemon move instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Sep 7, 2023
1 parent 56292bd commit 9775a6b
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions R/mod_poke_move.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,12 @@ mod_poke_move_server <- function(id, selected) {

moves <- selected()$moves

tablerCard(
title = paste0(selected()$name, " Moves"),
statusSide = "top",
collapsible = FALSE,
closable = FALSE,
zoomable = FALSE,
width = 12,

# card content
lapply(seq_along(moves), FUN = function(i) {
move_name <- moves[[i]]$name
move_pp <- moves[[i]]$pp
move_priority <- moves[[i]]$priority
move_type <- moves[[i]]$type
move_power <- moves[[i]]$power
move_accuracy <- moves[[i]]$accuracy
move_text <- moves[[i]]$text

fluidRow(
paste("Move: ", move_name),
tagAppendAttributes(
tablerTag(
paste("Power:", move_power),
href = NULL,
rounded = FALSE,
color = NULL
),
class = "mx-2"
),
move_text
)
})
)
# WORKSHOP TODO
# Process pokemon moves. This is a list so you
# can leverage lapply to treat each move:
# lapply(seq_along(moves), FUN = function(i) {
# # Process each move ...
# })
})
})
}

0 comments on commit 9775a6b

Please sign in to comment.