aephiday commited on
Commit
5f9be05
Β·
verified Β·
1 Parent(s): 0131936

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +7 -7
app.R CHANGED
@@ -12,7 +12,7 @@ source("minimal_global.R")
12
  # UI
13
  ui <- fluidPage(
14
  useShinyjs(),
15
- tabPanel(title = NULL, windowTitle = "Puzzle8"),
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
- paste("πŸŽ‰ Congratulations! Solved in", game_state$moves, "moves!"),
422
- type = "message", duration = 5
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