Skip to content

2048 webassembly implementation in Rust that can be run on browser or command line terminal

License

Notifications You must be signed in to change notification settings

ryanpig/wasm_terminal_2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

wasm-terminal-2048

The game 2048 is written in Rust that can be played with the GUI in a command line terminal or a browser by using webassembly. Both share the same library that contains the game logic.

Demo

Command line (Left) / Browser (Right)

The demo website is available at Here.

command line demo browser demo

Build & Run

Command line

  • cargo run -p wasm_terminal_2048_cli

Webassembly (web native)

  • cd wasm && ./build.sh
  • (Python 2.X) ./start-server-py2.sh
  • (Python 3.X) ./start-server-py3.sh
  • Open http://localhost:6001 on browser

Note: build NodeJS package by changing the build options in wasm-pack in build.sh wasm-pack build options

Documentation

  • (local build) cargo doc --open
  • crate.io

Features

  • Play 2048 in either command line terminal driven by the Rust crate termion or browser terminal driven by the JS library xtermjs
  • The game logic is encapsulated in the library, that can be shared with different front-end

LICENCE

MIT LICENCE

About

2048 webassembly implementation in Rust that can be run on browser or command line terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published