You can install the devel version of deminR from github with:
remotes::install_github("DivadNojnarg/deminR")
This is one of the greatest feature of shinyMobile. Below are the steps to follow (iOS, ipadOS):
1 | 2 | 3 |
---|---|---|
4 | 5 |
---|---|
For Android devices, it is recommended to use Chrome and the process is similar. (Note that Chrome for iOS does not support the add to homescreen feature.)
If for any reason the app crashes, you may kill it like a classic mobile app and restart!
Welcome to deminR, the R version of the Minesweeper. The goal is simple : flag all the mines as quick as possible by clicking on the grid. While this app is optimized for mobile use, it also works on desktop. Note that since the right click on desktop platforms is replaced by a long press for mobiles which takes more time, scores are categorized by devices. As soon as you click on a mine, the game is immediately lost. You may reset the game at any time when the timer is on by clicking on the option button in the navigation bar. After a success, the score may be shared on twitter (as long as you have a twitter account).
Welcome screen | Main tab | Game win | Game fail |
---|---|---|---|
The game currently has 3 difficulty levels: beginner, intermediate and expert. There is a fourth mode, namely the warrior mode, which significantly increases the challenge. A chat is included so that people may share their experience. If you want to check how to play minesweeper, a help section is available.
Game options | Game parameters | Scores list |
---|---|---|
Scores statistics | Dynamic chat | Help |
---|---|---|
Finally, you can change the global theme from dark (default) to light and inversely.
Theme light | Theme light | Theme light |
---|---|---|
We wish you a lot of fun!
When launched from desktop in local mode, some icons may not display as expected.
Once installed, you may play the deminR as shown below:
library(deminR)
## basic example code
run_app(usecase = "local")
You could also embed the app in a runGadget
function:
runGadget(run_app(usecase = "local"))
There is a "database" usecase which require a PostgreSQL database to be launched.
deminR is linked to a Postgres database containing (at the moment) 2 tables:
- scores
- messages for the chat
To create the scores table, one might use:
CREATE TABLE scores (
nickname varchar NOT NULL,
difficulty varchar (25) check (difficulty in ('Beginner', 'Intermediate', 'Advanced')),
score float (2) NOT NULL,
date varchar NOT NULL,
device varchar NOT NULL
);
and similarly for the messages table:
CREATE TABLE messages (
nickname varchar NOT NULL,
message varchar NOT NULL,
date varchar NOT NULL
);
INSERT INTO messages (nickname, message, date) VALUES ('bobby', 'My amazing message', '2020-03-04');
- The package structure was made with the package Golem
- The package UI is powered by shinyMobile
- The smileys used in the help section were created by Conmongt