@ -61,6 +61,11 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
@@ -61,6 +61,11 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
This is the second part of a series of tutorials on creating a [terminal-based](https://en.wikipedia.org/wiki/Text-based_user_interface) [Tetris](https://en.wikipedia.org/wiki/Tetris) clone with [Go](https://golang.org).
[**Code for this tutorial is available on GitLab.**](https://gitlab.com/tslocum/terminal-tetris-tutorial/-/tree/master/part-2)
[**Code for this tutorial is available on GitLab.**](https://code.rocketnine.space/tslocum/terminal-tetris-tutorial/src/branch/master/part-2)
```bash
go get gitlab.com/tslocum/terminal-tetris-tutorial/part-2 # Download and install
go get code.rocketnine.space/tslocum/terminal-tetris-tutorial/part-2 # Download and install
~/go/bin/part-2 # Run
```
For a complete implementation of a Tetris clone in Go, see [netris](https://gitlab.com/tslocum/netris).
For a complete implementation of a Tetris clone in Go, see [netris](https://code.rocketnine.space/tslocum/netris).
This is an introduction to using [tview](https://github.com/rivo/tview) (or [cview](https://gitlab.com/tslocum/cview)) to create rich terminal-based user interfaces with [Go](https://golang.org).
This is an introduction to using [tview](https://github.com/rivo/tview) (or [cview](https://code.rocketnine.space/tslocum/cview)) to create rich terminal-based user interfaces with [Go](https://golang.org).
## Primitives
@ -212,7 +212,7 @@ To display a primitive (and its contents), we call [Application.SetRoot](https:/
@@ -212,7 +212,7 @@ To display a primitive (and its contents), we call [Application.SetRoot](https:/
This function has two arguments, a primitive which will become the root of the screen, and a boolean which controls whether the primitive will be resized to fit the screen.
In this example, the root is a Grid containing a label, an input and a submit button. For a more complex example, see [netris](https://gitlab.com/tslocum/netris).
In this example, the root is a Grid containing a label, an input and a submit button. For a more complex example, see [netris](https://code.rocketnine.space/tslocum/netris).