Reza Rahimi
8/6/2017
Guessing a magician secret number is a fun brain game. Details about the game can be found in the following link: https://www.funbrain.com/games/guess-the-number
Players guess the secret number in the magician hat (Selected by Computer). If your guess is too high or too low, they will get a hint.
Here is the link to the developed shiny app for the fun brain - magician secret number: https://rezarahimi.shinyapps.io/whats_your_lucky_number/
Here is the code for the interface design of the shiny app; Magician Secret Number
#Loading Shiny App
library(shiny)
shinyUI( fluidPage(
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "bootstrap.css")
),
# Application Title
headerPanel("What is Your Lucky Number?!"),
sidebarPanel(
#numericInput('guess', 'Number', 1, min = 1, max = 1000, step = 1),
#submitButton('Submit')
textInput('guess', 'Number', value = ""),
h5('Please press \'Go!\' only on your first attempt'),
actionButton("goButton", "Go!")
),
mainPanel(
h2('Guess a number between 1 and 1000'),
h4('Guess the secret number in the magician hat (Selected by Computer). If your guess is too high or too low, you will get a hint.'),
h4('You entered'),
verbatimTextOutput("inputValue"),
h4('And is...'),
verbatimTextOutput("outputValue"),
h5('The idea is based on the GUESS THE MAGICIANS SECRET NUMBER : http://www.funbrain.com/guess/')
)
)
)
<!–html_preserve–>
Here is the link to the github repository for this app which includes the function code algorithm: https://github.com/rahamrahimi/Magician-Secret-Number