README.md

[![Travis Build Status](https://travis-ci.org/DivadNojnarg/deminR.svg?branch=master)](https://travis-ci.org/DivadNojnarg/deminR) [![CRAN status](https://www.r-pkg.org/badges/version/deminR)](https://CRAN.R-project.org/package=deminR) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) [![shinyapps.io](https://img.shields.io/badge/shinyapps.io-on-purple.svg)](https://dgranjon.shinyapps.io/deminR) [![rstudio cloud](https://img.shields.io/badge/rstudiocloud-on-blue.svg)](https://rstudio.cloud/project/1032373)

Installation

You can install the devel version of deminR from github with:

remotes::install_github("DivadNojnarg/deminR")

Make it full screen on your mobile? (PWA)

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!

Getting Started

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!

Limitations

When launched from desktop in local mode, some icons may not display as expected.

Example

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.

Database

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');

Credits



DivadNojnarg/deminR documentation built on April 14, 2020, 3:52 p.m.