app/game/server/services/player_action_undoer.js
Function undo_action
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static undo_action(game, player_cards) {
game.log.push(`<strong>${player_cards.username}</strong> requests to undo their last action`)
GameModel.update(game._id, game)
let ordered_player_cards = TurnOrderedPlayerCardsQuery.turn_ordered_player_cards(game, player_cards)
ordered_player_cards.shift()