npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wretris

v0.3.0

Published

w(asm) + r(ust) + (t)etris: Rust implementation of tetris using the Cursive library with wasm backend

Downloads

10

Readme

wretris

w(asm) + r(ust) + (t)etris

This is a simple implementation of the classic tetris game in Rust using Cursive library.

Features

This is a Tetris game implementation with additional keyboard shortcuts for easier block manipulation. In this game, you can move the blocks to the leftmost or rightmost position using the added shortcuts, and rotate them in the opposite direction and flipturn which is 180 degree rotation. This makes it easier to play the game with fewer keyboard inputs.

Installation

To install and run the game, you'll need to have Rust and Cargo installed on your system. Once you have Rust and Cargo installed, you can clone the repository and run the game using the following commands:

git clone https://github.com/geniecs/wretris.git
wasm-pack build
cd www
npm install
npm run dev

How to Play

The goal of the game is to clear as many lines as possible by fitting the falling blocks together. Use the keyboard controls to move and rotate the blocks as they fall. The game ends when the blocks reach the top of the screen or 40 lines are cleared.

Controls

  • a: Move the block to the leftmost position
  • d: Move the block to the rightmost position
  • w: Rotate the block counter-clockwise
  • ↑ or e: Rotate the block clockwise
  • ↓: Speed up the block
  • space: Hard drop the block
  • m: Stop and resume the game
  • n: Start a new game

Acknowledgements

This project was inspired by the classic Tetris game and Cursive library for Rust.

License

This project is licensed under the MIT License. See the LICENSE file for details.