Update app.R
Browse files
app.R
CHANGED
|
@@ -12,7 +12,7 @@ source("minimal_global.R")
|
|
| 12 |
# UI
|
| 13 |
ui <- fluidPage(
|
| 14 |
useShinyjs(),
|
| 15 |
-
|
| 16 |
tags$head(
|
| 17 |
tags$meta(name = "viewport", content = "width=device-width, initial-scale=1"),
|
| 18 |
tags$style(HTML("
|
|
@@ -417,10 +417,10 @@ server <- function(input, output, session) {
|
|
| 417 |
# Check win condition
|
| 418 |
if(is_solved(game_state$puzzle)) {
|
| 419 |
game_state$game_won <- TRUE
|
| 420 |
-
showNotification(
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
)
|
| 424 |
}
|
| 425 |
}
|
| 426 |
}
|
|
@@ -436,7 +436,7 @@ server <- function(input, output, session) {
|
|
| 436 |
game_state$moves <- 0
|
| 437 |
game_state$game_won <- FALSE
|
| 438 |
|
| 439 |
-
showNotification("New game started!", type = "message")
|
| 440 |
})
|
| 441 |
|
| 442 |
# Reset button
|
|
@@ -446,7 +446,7 @@ server <- function(input, output, session) {
|
|
| 446 |
game_state$moves <- 0
|
| 447 |
game_state$game_won <- FALSE
|
| 448 |
|
| 449 |
-
showNotification("Game reset!", type = "message")
|
| 450 |
}
|
| 451 |
})
|
| 452 |
|
|
|
|
| 12 |
# UI
|
| 13 |
ui <- fluidPage(
|
| 14 |
useShinyjs(),
|
| 15 |
+
titlePanel(windowTitle = "Puzzle8"),
|
| 16 |
tags$head(
|
| 17 |
tags$meta(name = "viewport", content = "width=device-width, initial-scale=1"),
|
| 18 |
tags$style(HTML("
|
|
|
|
| 417 |
# Check win condition
|
| 418 |
if(is_solved(game_state$puzzle)) {
|
| 419 |
game_state$game_won <- TRUE
|
| 420 |
+
# showNotification(
|
| 421 |
+
# paste("π Congratulations! Solved in", game_state$moves, "moves!"),
|
| 422 |
+
# type = "message", duration = 5
|
| 423 |
+
# )
|
| 424 |
}
|
| 425 |
}
|
| 426 |
}
|
|
|
|
| 436 |
game_state$moves <- 0
|
| 437 |
game_state$game_won <- FALSE
|
| 438 |
|
| 439 |
+
# showNotification("New game started!", type = "message")
|
| 440 |
})
|
| 441 |
|
| 442 |
# Reset button
|
|
|
|
| 446 |
game_state$moves <- 0
|
| 447 |
game_state$game_won <- FALSE
|
| 448 |
|
| 449 |
+
# showNotification("Game reset!", type = "message")
|
| 450 |
}
|
| 451 |
})
|
| 452 |
|