Skip to content

phoenixeliot/Tetris.ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Tetris.ls

A quick-and-dirty Tetris clone written in a day to learn LiveScript, a fork of CoffeeScript.

Play it on my portfolio site.

What it is

  • Super short — only 142 lines!

What it isn't

  • Object-oriented
  • Fully-featured (you can't technically win or lose; restarting consists of reloading the page)
  • Super clean (adding the prediction took some hacks; OOP would be the right way to go)

Running it yourself

Because this is in LiveScript, it must be compiled to JavaScript. I use rails, so here are rails-specific instructions.

Add tetris.ls to your app/assets/javascripts folder.

Add this to your Gemfile:

gem 'livescript-rails'

Add this to any HTML page:

<div class="tetris">
  <canvas width="200" height="360"></canvas>
</div>

About

A quick-and-dirty Tetris clone written in Livescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published