An open API service indexing awesome lists of open source software.

https://github.com/pierrechevalier83/slider

A Slider Puzzle implemented in rust
https://github.com/pierrechevalier83/slider

graphics piston rust slider-puzzle

Last synced: 9 months ago
JSON representation

A Slider Puzzle implemented in rust

Awesome Lists containing this project

README

          

# slider
A slider puzzle written in Rust using the Piston library

[![Build Status](https://travis-ci.org/pierrechevalier83/slider.svg?branch=master)](https://travis-ci.org/pierrechevalier83/slider) [![Clippy Linting Result](https://clippy.bashy.io/github/pierrechevalier83/slider/master/badge.svg)](https://clippy.bashy.io/github/pierrechevalier83/slider/master/log)

## How to configure
- Check out src/settings.rs
- You can customize the image path
- The image needs to be present in the assets folder
- If no image is found, it will default to a gradient of colors
- You can also customize various sizes

## Build steps
With high resolution pigtures, debug is very slow
`cargo run --release`

## How to play
- Arrows to move tile
- Space to shuffle

![alt tag](https://raw.githubusercontent.com/pierrechevalier83/slider/master/slider.png)

## TODO
- unit tests
- get rid of global state (mostly from settings.rs)
- settings: make configurable (size, color, image or not, ...)
- scoring mechanisms

## Notes
I am new to rust. Feel free to leave feedback on the code. (I now I must be missing lots of opportunities for using idiomatic constructions)