go-tetris/README.md

89 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2017-03-27 15:07:29 -05:00
# Go Tetris
2018-05-23 15:47:48 -05:00
Golang Tetris for console window with optional AI
2017-03-27 15:07:29 -05:00
2019-01-09 20:30:45 -06:00
## Features include
- AI (use i key to toggle)
- Lock delay
- Next piece
- Ghost piece
- Top scores
- Board choices
- Edit boards
2017-03-27 15:07:29 -05:00
## Compile
2018-06-01 09:48:23 -05:00
```
go get github.com/MichaelS11/go-tetris
go install github.com/MichaelS11/go-tetris
```
2017-03-27 15:07:29 -05:00
## Play
2018-06-01 09:54:16 -05:00
Then run the binary created, go-tetris or go-tetris.exe
2017-03-27 15:07:29 -05:00
2019-01-09 20:30:45 -06:00
## Keys start screen
| Key | Action |
| --- | --- |
| ← | previous board |
| → | next board |
| spacebar | start game |
| ctrl e | edit board |
| q | quit |
## Keys during game
2017-03-27 15:07:29 -05:00
| Key | Action |
| --- | --- |
| ← | left move |
| → | right move |
| ↓ | soft drop |
| ↑ | hard drop |
| spacebar | hard drop |
2019-01-09 20:30:45 -06:00
| z | left rotate |
| x | right rotate |
2017-03-27 15:07:29 -05:00
| p | pause |
| q | quit |
2017-08-30 12:03:50 -05:00
| i | toggle AI |
2017-03-27 15:07:29 -05:00
2019-01-09 20:30:45 -06:00
## Keys edit mode
| Key | Action |
| --- | --- |
2019-01-09 20:30:45 -06:00
| ← | move cursor left |
| → | move cursor right |
| ↓ | move cursor down |
| ↑ | move cursor up |
| z | rotate left |
| x | rotate right |
| c | cyan block - I |
| b | blue block - J |
| w | white block - L |
| e | yellow block - O |
| g | green block - S |
| a | magenta block - T |
| r | red block - Z |
| f | free block |
| ctrl b | change board size |
| ctrl s | save board |
| ctrl n | save board as new |
| ctrl k | delete board |
| ctrl o | empty board |
| ctrl q | quit edit mode |
2017-03-27 15:07:29 -05:00
## Screenshots
2019-01-09 20:30:45 -06:00
![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/tetris.png "Go Tetris")
2017-03-27 15:07:29 -05:00
2019-01-09 20:30:45 -06:00
![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/heart.png "Golang Tetris Heart")
2017-03-27 15:07:29 -05:00
2019-01-09 20:30:45 -06:00
![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/editmode.png "Edit Mode Peace Symbol")
2019-01-09 20:30:45 -06:00
![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/highscores.png "Tetris High Scores")
## To do
* Improve AI speed (slow on large boards)