Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renuo/renuo-rubris
Renuo Rubris
https://github.com/renuo/renuo-rubris
r-pascalandermatt renuo-rubris
Last synced: about 1 month ago
JSON representation
Renuo Rubris
- Host: GitHub
- URL: https://github.com/renuo/renuo-rubris
- Owner: renuo
- License: mit
- Created: 2016-09-23T09:52:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T21:51:23.000Z (about 3 years ago)
- Last Synced: 2023-03-23T12:14:34.677Z (almost 2 years ago)
- Topics: r-pascalandermatt, renuo-rubris
- Language: Ruby
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Renuo Rubris
## Ruby Console Tetris
### Clone and Play (Quick Start)
```
git clone [email protected]:renuo/ruby-tetris.git && cd ruby-tetris && bundle install && ruby game.rb
```#### Clone Game and Setup
```
git clone [email protected]:renuo/ruby-tetris.git
cd ruby-tetris
bin/play
```or
```
git clone [email protected]:renuo/ruby-tetris.git
cd ruby-tetris
bundle install
```#### Start Game
```
bin/play
```or
`bin/run` or `ruby game.rb`
### Game Instructions
`[Q]` Exit Game
`[W]` Rotate (or Arrow Up)
`[S]` Move Down (or Arrow Down)
`[A]` Move Left (or Arrow Left)
`[D]` Move Right (or Arrow Right)
### Used Gems
* colorize
* curses
* ruby-terminfo### Tetris Blocks
####`@tetris`#### Line
```
[1]
[1]
[1]
[1]
```
#### Square
```
[1, 1]
[1, 1]
```
#### Tee
```
[1, 0]
[1, 1]
[1, 0]
```
#### J-shape
```
[1, 1]
[1, 0]
[1, 0]
```
#### L-shape
```
[1, 1]
[0, 1]
[0, 1]
```
#### S-shape
```
[1, 0]
[1, 1]
[0, 1]
```
#### Z-shape
```
[0, 1]
[1, 1]
[1, 0]
```
### Code
#### @current_tetris```
@current_tetris = [ 0 , 0 , 0 , @tetris.sample]
[X-coordinate,Y-coordinate,rotation, tetris ]
```