# react-super-slide-me

> super slide me game as a react component

Latest version **1.1.7** (published 2022-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-super-slide-me
pnpm add react-super-slide-me
yarn add react-super-slide-me
bun add react-super-slide-me
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2022-07-27 |
| First published | 2022-04-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 131.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yatne |
| Maintainers | yatne |
| Keywords | react, game |

## Links

- npm: https://www.npmjs.com/package/react-super-slide-me
- Repository: https://github.com/yatne/react-super-slide-me
- Homepage: https://github.com/yatne/react-super-slide-me#readme
- Issues: https://github.com/yatne/react-super-slide-me/issues
- npm.io page: https://npm.io/package/react-super-slide-me

## Dependencies (4)

- [redux](https://npm.io/package/redux.md) ^4.2.0
- [react-redux](https://npm.io/package/react-redux.md) ^8.0.1
- [react-swipeable](https://npm.io/package/react-swipeable.md) ^7.0.0
- [@reduxjs/toolkit](https://npm.io/package/@reduxjs/toolkit.md) ^1.8.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.7 (latest) — 2022-07-27
- 1.1.6 — 2022-06-17
- 1.1.5 — 2022-06-17
- 1.1.4 — 2022-06-08
- 1.1.3 — 2022-06-06
- 1.1.2 — 2022-06-05
- 1.1.1 — 2022-06-05
- 1.1.0 — 2022-06-02
- 1.0.9 — 2022-05-25
- 1.0.8 — 2022-05-25
- 1.0.7 — 2022-05-23
- 1.0.5 — 2022-05-02
- 1.0.4 — 2022-04-28
- 1.0.3 — 2022-04-28
- 1.0.2 — 2022-04-26
- … 2 more at https://npm.io/package/react-super-slide-me/versions

## README

# react-super-slide-me
"Super Slide Me" puzzle game as React component

![game screen shot](screen.png)

###How to use

In order to embed the full game onto your site simply add `<SuperSlideMe />` component in the desired place in code.

You can customise the game to your liking using props.

`<SuperSlideMe />` accepts props:

<table>
    <tr>
        <td>id</td>
        <td>Mostly optional id. It is passed to the game component. Can be used to find the game in the DOM, for css styles etc.

It is required only if you embed two games, with the same level config at once.
</td>
    </tr>
    <tr>
        <td>width</td>
        <td>Component's width (in pixels) - if you don't provide this prop component will use its parent's width</td>
    </tr>
    <tr>
        <td>onLastLevelReached</td>
        <td>Callback function fired when player finishes the game. (Last level is just an end screen.)</td>
    </tr>
    <tr>
        <td>levelConfig</td>
        <td>Level configuration object (see below)</td>
    </tr>
    <tr>
        <td>customLevels</td>
        <td>Custom levels array (see below)</td>
    </tr>
</table>

### Level Config

levelConfig prop accepts object in form:

{\
&nbsp;&nbsp;levelSets: string[]\
&nbsp;&nbsp;levelFilter: string\
}

All the levels in game are divided into sets: "A", "B", "C", "D", "E", "F", "X".
Each set has 16 levels and introduces new mechanic. You can specify which sets should your game use by declaring them in an array. By Default all sets are used.

levelFilter can have one of the following values: 

`all` - all levels are used

`onlyEasy` - only first 8 levels of each set are used

`onlyHard` - only last 8 levels of each set are used

`short` - only 1st, 2nd, 9th and 10th levels of each set are used (it's a shorter version of the full game)

`onlyCustom` - none of the levels from any sets are used.


### Custom Levels

You can create your own levels and provide them in `customLevels` props. This prop requires an array of strings. Each string should represent a level.

Example string level representation:

```
'x..x.bx' +
'.xbx.x.' +
'.......' +
'x..e...' +
's.g.g..' +
'x......' +
'.x.x.x.'
```

Each character represents one block/field. Level needs to be square.

Available characters:

<table>
<tr><td>.</td><td>empty field</td></tr>
<tr><td>x</td><td>wall</td></tr>
<tr><td>s</td><td>blue start</td></tr>
<tr><td>S</td><td>pink start</td></tr>
<tr><td>e</td><td>blue end</td></tr>
<tr><td>E</td><td>pink end</td></tr>
<tr><td>b</td><td>moving box</td></tr>
<tr><td>g</td><td>green field</td></tr>
<tr><td>r</td><td>red field</td></tr>
<tr><td>o</td><td>orange wall</td></tr>
<tr><td>c</td><td>orange crushing ball</td></tr>
<tr><td>B</td><td>blue moving box</td></tr>
<tr><td>p</td><td>blue empty field</td></tr>


</table>

---
_Source: https://npm.io/package/react-super-slide-me · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
