From ab5692a2da2528418b9a6653b31aba1f5b99f2cc Mon Sep 17 00:00:00 2001 From: MichaelS11 Date: Wed, 9 Jan 2019 18:30:45 -0800 Subject: [PATCH] Added edit mode Added peace symbol --- README.md | 79 +- board.go | 89 +- boards.go | 1783 ++++++++++++++--------------------- edit.go | 207 ++++ engine.go | 18 +- globals.go | 43 +- keyInput.go | 93 +- mino_test.go | 5 + screenshots/editmode.png | Bin 0 -> 13796 bytes screenshots/heart.png | Bin 0 -> 7354 bytes screenshots/highscores.png | Bin 0 -> 6894 bytes screenshots/screenshot1.png | Bin 5444 -> 0 bytes screenshots/screenshot2.png | Bin 5862 -> 0 bytes screenshots/screenshot3.png | Bin 8040 -> 0 bytes screenshots/screenshot4.png | Bin 6970 -> 0 bytes screenshots/tetris.png | Bin 0 -> 6127 bytes tetris.go | 14 +- view.go | 205 +++- 18 files changed, 1363 insertions(+), 1173 deletions(-) create mode 100644 edit.go create mode 100644 screenshots/editmode.png create mode 100644 screenshots/heart.png create mode 100644 screenshots/highscores.png delete mode 100644 screenshots/screenshot1.png delete mode 100644 screenshots/screenshot2.png delete mode 100644 screenshots/screenshot3.png delete mode 100644 screenshots/screenshot4.png create mode 100644 screenshots/tetris.png diff --git a/README.md b/README.md index 7cee32e..da95338 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ Golang Tetris for console window with optional AI +## Features include + +- AI (use i key to toggle) +- Lock delay +- Next piece +- Ghost piece +- Top scores +- Board choices +- Edit boards + ## Compile ``` @@ -13,21 +23,6 @@ go install github.com/MichaelS11/go-tetris Then run the binary created, go-tetris or go-tetris.exe -## Keys during game - -| Key | Action | -| --- | --- | -| ← | left move | -| z | left rotate | -| x | right rotate | -| → | right move | -| ↓ | soft drop | -| ↑ | hard drop | -| spacebar | hard drop | -| p | pause | -| q | quit | -| i | toggle AI | - ## Keys start screen | Key | Action | @@ -35,26 +30,58 @@ Then run the binary created, go-tetris or go-tetris.exe | ← | previous board | | → | next board | | spacebar | start game | +| ctrl e | edit board | | q | quit | -## Features include +## Keys during game -- AI (use i key to toggle) -- Lock delay -- Next piece -- Ghost piece -- Top scores -- Board choices +| Key | Action | +| --- | --- | +| ← | left move | +| → | right move | +| ↓ | soft drop | +| ↑ | hard drop | +| spacebar | hard drop | +| z | left rotate | +| x | right rotate | +| p | pause | +| q | quit | +| i | toggle AI | + +## Keys edit mode + +| Key | Action | +| --- | --- | +| ← | 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 | ## Screenshots -![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/screenshot1.png "Go Tetris") +![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/tetris.png "Go Tetris") -![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/screenshot2.png "Golang Tetris") +![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/heart.png "Golang Tetris Heart") -![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/screenshot3.png "Golang Tetris Heart") +![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/editmode.png "Edit Mode Peace Symbol") -![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/screenshot4.png "Tetris High Scores") +![alt text](https://raw.githubusercontent.com/MichaelS11/tetris/master/screenshots/highscores.png "Tetris High Scores") ## To do diff --git a/board.go b/board.go index 43b53c6..50340ac 100644 --- a/board.go +++ b/board.go @@ -13,24 +13,73 @@ func NewBoard() { board.Clear() } -// Clear clears the board +// ChangeBoardSize changes board size +func ChangeBoardSize(width int, height int) { + if board.width == width && board.height == height { + return + } + + newBoard := &Board{width: width, height: height, boardsIndex: board.boardsIndex} + newBoard.colors = make([][]termbox.Attribute, width) + for i := 0; i < width; i++ { + newBoard.colors[i] = make([]termbox.Attribute, height) + for j := 0; j < height; j++ { + if i < board.width && j < board.height { + newBoard.colors[i][j] = board.colors[i][j] + } else { + newBoard.colors[i][j] = blankColor + } + } + } + newBoard.rotation = make([][]int, width) + for i := 0; i < width; i++ { + newBoard.rotation[i] = make([]int, height) + for j := 0; j < height; j++ { + if i < board.width && j < board.height { + newBoard.rotation[i][j] = board.rotation[i][j] + } else { + break + } + } + } + + board = newBoard + board.previewMino = NewMino() + board.currentMino = NewMino() +} + +// Clear clears the board to orginal state func (board *Board) Clear() { board.width = len(boards[board.boardsIndex].colors) board.height = len(boards[board.boardsIndex].colors[0]) - board.colors = make([][]termbox.Attribute, len(boards[board.boardsIndex].colors)) - for i := 0; i < len(boards[board.boardsIndex].colors); i++ { - board.colors[i] = make([]termbox.Attribute, len(boards[board.boardsIndex].colors[i])) + board.colors = make([][]termbox.Attribute, board.width) + for i := 0; i < board.width; i++ { + board.colors[i] = make([]termbox.Attribute, board.height) copy(board.colors[i], boards[board.boardsIndex].colors[i]) } - board.rotation = make([][]int, len(boards[board.boardsIndex].rotation)) - for i := 0; i < len(boards[board.boardsIndex].rotation); i++ { - board.rotation[i] = make([]int, len(boards[board.boardsIndex].rotation[i])) + board.rotation = make([][]int, board.width) + for i := 0; i < board.width; i++ { + board.rotation[i] = make([]int, board.height) copy(board.rotation[i], boards[board.boardsIndex].rotation[i]) } board.previewMino = NewMino() board.currentMino = NewMino() } +// EmptyBoard removes all blocks/colors from the board +func (board *Board) EmptyBoard() { + for i := 0; i < board.width; i++ { + for j := 0; j < board.height; j++ { + board.colors[i][j] = blankColor + } + } + for i := 0; i < board.width; i++ { + for j := 0; j < board.height; j++ { + board.rotation[i][j] = 0 + } + } +} + // PreviousBoard switches to previous board func (board *Board) PreviousBoard() { board.boardsIndex-- @@ -247,9 +296,30 @@ func (board *Board) deleteLine(line int) { // SetColor sets the color and rotation of board location func (board *Board) SetColor(x int, y int, color termbox.Attribute, rotation int) { board.colors[x][y] = color + if rotation < 0 { + return + } board.rotation[x][y] = rotation } +// RotateLeft rotates cell left +func (board *Board) RotateLeft(x int, y int) { + if board.rotation[x][y] == 0 { + board.rotation[x][y] = 3 + return + } + board.rotation[x][y]-- +} + +// RotateRight rotates cell right +func (board *Board) RotateRight(x int, y int) { + if board.rotation[x][y] == 3 { + board.rotation[x][y] = 0 + return + } + board.rotation[x][y]++ +} + // ValidBlockLocation checks if block location is vaild func (board *Board) ValidBlockLocation(x int, y int, mustBeOnBoard bool) bool { if x < 0 || x >= board.width || y >= board.height { @@ -311,6 +381,11 @@ func (board *Board) DrawDropMino() { mino.DrawMino(MinoDrop) } +// DrawCursor draws the edit cursor +func (board *Board) DrawCursor(x int, y int) { + view.DrawCursor(x, y, board.colors[x][y]) +} + // printDebugBoard is for printing board in text for debuging func (board *Board) printDebugBoard() { for j := 0; j < board.height; j++ { diff --git a/boards.go b/boards.go index 9341ea8..6663120 100644 --- a/boards.go +++ b/boards.go @@ -1,1086 +1,715 @@ package main import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "github.com/nsf/termbox-go" ) -func init() { - boards = []Boards{ +// loadBoards loads the internal boards +func loadBoards() error { + logger.Println("loadBoards start") - // 10 x 20 blank - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 10 x 20 checkerboard double - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - }}, - - // 10 x 20 checkerboard single - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 20 x 20 blank - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 20 x 20 heart - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorWhite, - termbox.ColorWhite, termbox.ColorWhite, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - termbox.ColorMagenta, termbox.ColorWhite, termbox.ColorYellow, termbox.ColorYellow, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, termbox.ColorMagenta, - termbox.ColorMagenta, termbox.ColorMagenta, termbox.ColorYellow, termbox.ColorYellow, termbox.ColorBlue, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorWhite, termbox.ColorWhite, termbox.ColorWhite, - termbox.ColorCyan, termbox.ColorCyan, termbox.ColorCyan, termbox.ColorCyan, termbox.ColorBlue, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorGreen, termbox.ColorGreen, termbox.ColorWhite, - termbox.ColorWhite, termbox.ColorWhite, termbox.ColorRed, termbox.ColorRed, termbox.ColorBlue, termbox.ColorBlue, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorGreen, termbox.ColorGreen, - termbox.ColorWhite, termbox.ColorRed, termbox.ColorRed, termbox.ColorCyan, termbox.ColorCyan, termbox.ColorCyan, termbox.ColorCyan, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorBlue, termbox.ColorBlue, - termbox.ColorWhite, termbox.ColorGreen, termbox.ColorGreen, termbox.ColorMagenta, termbox.ColorMagenta, termbox.ColorMagenta, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorGreen, termbox.ColorBlue, - termbox.ColorYellow, termbox.ColorYellow, termbox.ColorGreen, termbox.ColorGreen, termbox.ColorMagenta, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorGreen, termbox.ColorGreen, termbox.ColorBlue, - termbox.ColorYellow, termbox.ColorYellow, termbox.ColorYellow, termbox.ColorYellow, termbox.ColorWhite, termbox.ColorWhite, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorGreen, termbox.ColorRed, termbox.ColorRed, - termbox.ColorGreen, termbox.ColorGreen, termbox.ColorYellow, termbox.ColorYellow, termbox.ColorWhite, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, termbox.ColorMagenta, - termbox.ColorBlue, termbox.ColorGreen, termbox.ColorGreen, termbox.ColorBlue, termbox.ColorWhite, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorMagenta, termbox.ColorMagenta, - termbox.ColorBlue, termbox.ColorBlue, termbox.ColorBlue, termbox.ColorBlue, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorMagenta, - termbox.ColorBlue, termbox.ColorBlue, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 0, 0, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 0, 0}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 2, 2, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 0, 0, 0, 2, 2, 0, 0, 0}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 0, 0, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 0, 0, 0, 0, 0, 0, 0, 0}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 20 x 20 checkerboard double - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 20 x 20 checkerboard single - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 30 x 30 blank - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, - blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0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 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, - - // 30 x 30 checkerboard double - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, - blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, - termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed, blankColor, blankColor, termbox.ColorRed, termbox.ColorRed}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2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, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, - 2, 2, 0, 0, 2, 2, 0, 0, 2, 2}, - }}, - - // 30 x 30 checkerboard single - { - colors: [][]termbox.Attribute{ - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, - blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed}, - {blankColor, blankColor, blankColor, blankColor, blankColor, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, - termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor, termbox.ColorRed, blankColor}, - }, - rotation: [][]int{ - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -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 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - }}, + var boardsJSON []BoardsJSON + err := json.Unmarshal(boardsInternal, &boardsJSON) + if err != nil { + return fmt.Errorf("unmarshal error: %v", err) } + + numInternalBoards = len(boardsJSON) + boards = make([]Boards, numInternalBoards) + + for boardNum, boardLoad := range boardsJSON { + aBoards := Boards{name: boardLoad.Name} + aBoards.colors = make([][]termbox.Attribute, len(boardLoad.Mino)) + aBoards.rotation = boardLoad.Rotation + + for i := 0; i < len(boardLoad.Mino); i++ { + aBoards.colors[i] = make([]termbox.Attribute, len(boardLoad.Mino[i])) + for j := 0; j < len(boardLoad.Mino[i]); j++ { + switch boardLoad.Mino[i][j] { + case "b": + aBoards.colors[i][j] = blankColor + case "i": + aBoards.colors[i][j] = termbox.ColorCyan + case "j": + aBoards.colors[i][j] = termbox.ColorBlue + case "l": + aBoards.colors[i][j] = termbox.ColorWhite + case "o": + aBoards.colors[i][j] = termbox.ColorYellow + case "s": + aBoards.colors[i][j] = termbox.ColorGreen + case "t": + aBoards.colors[i][j] = termbox.ColorMagenta + case "z": + aBoards.colors[i][j] = termbox.ColorRed + } + } + } + boards[boardNum] = aBoards + } + + boardsJSON = nil + + logger.Println("loadBoards end") + + return nil } + +// loadUserBoards loads the user boards from file +func loadUserBoards() error { + _, err := os.Stat(baseDir + settingsFileName) + if os.IsNotExist(err) { + return nil + } + + logger.Println("loadUserBoards start") + + if err != nil { + return fmt.Errorf("stat error: %v", err) + } + + var settingsJSON []byte + settingsJSON, err = ioutil.ReadFile(baseDir + settingsFileName) + if err != nil { + return fmt.Errorf("read file error: %v", err) + } + if len(settingsJSON) < 2 { + return nil + } + + var settings Settings + err = json.Unmarshal(settingsJSON, &settings) + if err != nil { + return fmt.Errorf("unmarshal error: %v", err) + } + + for _, boardLoad := range settings.Boards { + aBoards := Boards{name: boardLoad.Name} + aBoards.colors = make([][]termbox.Attribute, len(boardLoad.Mino)) + aBoards.rotation = boardLoad.Rotation + + for i := 0; i < len(boardLoad.Mino); i++ { + aBoards.colors[i] = make([]termbox.Attribute, len(boardLoad.Mino[i])) + for j := 0; j < len(boardLoad.Mino[i]); j++ { + switch boardLoad.Mino[i][j] { + case "b": + aBoards.colors[i][j] = blankColor + case "i": + aBoards.colors[i][j] = termbox.ColorCyan + case "j": + aBoards.colors[i][j] = termbox.ColorBlue + case "l": + aBoards.colors[i][j] = termbox.ColorWhite + case "o": + aBoards.colors[i][j] = termbox.ColorYellow + case "s": + aBoards.colors[i][j] = termbox.ColorGreen + case "t": + aBoards.colors[i][j] = termbox.ColorMagenta + case "z": + aBoards.colors[i][j] = termbox.ColorRed + } + } + } + + boards = append(boards, aBoards) + } + + logger.Println("loadUserBoards end") + + return nil +} + +// saveUserBoards saves the user boards to file +func saveUserBoards() error { + logger.Println("saveUserBoards start") + + boardsJSON := make([]BoardsJSON, len(boards)-numInternalBoards) + + for x := numInternalBoards; x < len(boards); x++ { + aBoards := BoardsJSON{Name: boards[x].name} + aBoards.Mino = make([][]string, len(boards[x].colors)) + aBoards.Rotation = boards[x].rotation + + for i := 0; i < len(boards[x].colors); i++ { + aBoards.Mino[i] = make([]string, len(boards[x].colors[i])) + for j := 0; j < len(boards[x].colors[i]); j++ { + switch boards[x].colors[i][j] { + case blankColor: + aBoards.Mino[i][j] = "b" + case termbox.ColorCyan: + aBoards.Mino[i][j] = "i" + case termbox.ColorBlue: + aBoards.Mino[i][j] = "j" + case termbox.ColorWhite: + aBoards.Mino[i][j] = "l" + case termbox.ColorYellow: + aBoards.Mino[i][j] = "o" + case termbox.ColorGreen: + aBoards.Mino[i][j] = "s" + case termbox.ColorMagenta: + aBoards.Mino[i][j] = "t" + case termbox.ColorRed: + aBoards.Mino[i][j] = "z" + } + } + } + + boardsJSON[x-numInternalBoards] = aBoards + } + + settings := Settings{Boards: boardsJSON} + + settingsJSON, err := json.Marshal(settings) + if err != nil { + return fmt.Errorf("marshal error: %v", err) + } + + err = ioutil.WriteFile(baseDir+settingsFileName, settingsJSON, 0644) + if err != nil { + return fmt.Errorf("write file error: %v", err) + } + + logger.Println("saveUserBoards end") + + return nil +} + +var boardsInternal = []byte(` +[ + { + "name":"10 x 20 blank", + "mino":[ + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"10 x 20 checkerboard double", + "mino":[ + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"10 x 20 checkerboard single", + "mino":[ + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"] + ], + "rotation":[ + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"20 x 20 blank", + "mino":[ + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"20 x 20 heart", + "mino":[ + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","l","l","l","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","z","z","t","l","o","o","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","z","z","t","t","t","o","o","j","b","b","b","b","b"], + ["b","b","b","b","b","b","b","l","l","l","i","i","i","i","j","b","b","b","b","b"], + ["b","b","b","b","b","b","b","s","s","l","l","l","z","z","j","j","b","b","b","b"], + ["b","b","b","b","b","b","b","b","s","s","l","z","z","i","i","i","i","b","b","b"], + ["b","b","b","b","b","b","b","b","j","j","l","s","s","t","t","t","z","z","b","b"], + ["b","b","b","b","b","b","b","b","s","j","o","o","s","s","t","z","z","b","b","b"], + ["b","b","b","b","b","b","b","s","s","j","o","o","o","o","l","l","b","b","b","b"], + ["b","b","b","b","b","b","b","s","z","z","s","s","o","o","l","b","b","b","b","b"], + ["b","b","b","b","b","b","b","z","z","t","j","s","s","j","l","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","t","t","j","j","j","j","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","t","j","j","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,1,1,3,1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,1,1,3,3,3,0,0,2,0,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1,3,3,3,3,2,0,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1,2,2,1,1,2,2,0,0,0,0], + [0,0,0,0,0,0,0,0,1,1,2,1,1,1,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,0,0], + [0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0], + [0,0,0,0,0,0,0,0,0,0,1,1,3,3,2,2,0,0,0,0], + [0,0,0,0,0,0,0,0,1,1,1,1,3,3,2,0,0,0,0,0], + [0,0,0,0,0,0,0,1,1,0,2,1,1,1,2,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,2,3,3,3,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"20 x 20 checkerboard double", + "mino":[ + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"20 x 20 checkerboard single", + "mino":[ + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"] + ], + "rotation":[ + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"26 x 28 peace symbol", + "Mino":[ + ["b","b","b","b","b","b","b","b","b","b","b","b","j","i","i","i","i","o","o","l","l","j","j","j","z","j","j","i"], + ["b","b","b","b","b","b","b","b","j","l","j","j","j","s","j","j","j","o","o","l","z","j","l","l","z","z","j","i"], + ["b","b","b","b","b","b","b","b","j","l","l","l","s","s","j","b","b","b","b","l","z","z","l","o","o","z","j","i"], + ["b","b","b","b","b","b","b","t","j","j","z","z","s","b","b","b","j","l","b","b","b","z","l","o","o","j","z","i"], + ["b","b","b","b","b","b","t","t","t","z","z","b","b","b","j","j","j","l","l","l","b","b","b","j","j","j","z","z"], + ["b","b","b","b","b","b","i","i","i","i","b","b","j","z","s","s","t","t","t","z","z","s","b","b","t","t","t","z"], + ["b","b","b","b","b","b","t","t","t","b","b","s","j","z","z","s","s","t","z","z","s","s","b","b","b","t","l","l"], + ["b","b","b","b","b","b","b","t","b","b","s","s","j","j","z","j","j","j","o","o","s","b","b","s","b","b","l","i"], + ["b","b","b","b","b","b","z","z","b","l","s","i","i","i","i","j","s","s","o","o","b","b","s","s","j","b","l","i"], + ["b","b","b","b","b","z","z","b","b","l","o","o","l","l","t","t","t","s","s","b","b","z","s","b","j","b","b","i"], + ["b","b","b","b","b","l","l","b","l","l","o","o","l","o","o","t","z","z","b","b","t","z","z","l","j","j","b","i"], + ["b","b","b","b","b","l","b","b","i","i","i","i","l","o","o","z","z","b","b","t","t","t","z","l","l","l","b","b"], + ["b","b","b","b","b","l","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","j","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","j","b","b","o","o","l","l","t","t","t","z","z","b","b","i","i","i","i","j","o","o","b","b"], + ["b","b","b","b","b","j","j","b","o","o","l","s","s","t","z","z","s","s","b","b","s","s","b","j","o","o","b","l"], + ["b","b","b","b","b","b","z","b","b","z","l","i","s","s","l","l","l","s","s","b","b","s","s","j","j","b","b","l"], + ["b","b","b","b","b","b","z","z","b","z","z","i","j","j","j","i","l","j","j","j","b","b","t","t","t","b","l","l"], + ["b","b","b","b","b","b","l","z","b","b","z","i","j","o","o","i","s","j","o","o","z","b","b","t","b","b","j","j"], + ["b","b","b","b","b","b","l","l","l","b","b","i","l","o","o","i","s","s","o","o","z","z","b","b","b","o","o","j"], + ["b","b","b","b","b","b","i","i","i","i","b","b","l","l","l","i","j","s","t","t","t","z","b","b","t","o","o","j"], + ["b","b","b","b","b","b","b","b","t","s","s","b","b","b","j","j","j","z","z","t","b","b","b","t","t","t","z","z"], + ["b","b","b","b","b","b","b","b","t","t","s","s","l","b","b","b","z","z","b","b","b","i","i","i","i","z","z","i"], + ["b","b","b","b","b","b","b","b","t","o","o","z","l","l","l","b","b","b","b","j","j","j","t","t","t","j","j","i"], + ["b","b","b","b","b","b","b","b","b","o","o","z","z","j","j","j","l","l","l","j","t","s","s","t","o","o","j","i"], + ["b","b","b","b","b","b","b","b","i","i","i","i","z","j","i","i","i","i","l","t","t","t","s","s","o","o","j","i"] + ], + "Rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,2,2,1,1,1,0,0,0,2], + [0,0,0,0,0,0,0,0,2,3,3,3,3,0,1,1,1,0,0,2,0,1,2,2,0,0,0,2], + [0,0,0,0,0,0,0,0,2,3,3,3,0,0,1,0,0,0,0,2,0,0,2,1,1,0,0,2], + [0,0,0,0,0,0,0,3,2,2,1,1,0,0,0,0,3,3,0,0,0,0,2,1,1,3,0,2], + [0,0,0,0,0,0,3,3,3,1,1,0,0,0,3,3,3,3,3,3,0,0,0,3,3,3,0,0], + [0,0,0,0,0,0,1,1,1,1,0,0,2,0,3,3,1,1,1,3,3,0,0,0,1,1,1,0], + [0,0,0,0,0,0,1,1,1,0,0,2,2,0,0,3,3,1,3,3,0,0,0,0,0,1,2,2], + [0,0,0,0,0,0,0,1,0,0,2,2,2,2,0,1,1,1,2,2,0,0,0,2,0,0,2,0],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1,3,3,3,3,3,3,3,0,2] + ] + }, + { + "name":"30 x 30 blank", + "mino":[ + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"], + ["b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,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0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"30 x 30 checkerboard double", + "mino":[ + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"], + ["b","b","b","b","b","b","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z","b","b","z","z"] + ], + "rotation":[ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,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+ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + }, + { + "name":"30 x 30 checkerboard single", + "mino":[ + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"], + ["b","b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z"], + ["b","b","b","b","b","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b","z","b"] + ], + "rotation":[ + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + ] + } +] +`) diff --git a/edit.go b/edit.go new file mode 100644 index 0000000..7392021 --- /dev/null +++ b/edit.go @@ -0,0 +1,207 @@ +package main + +import ( + "time" + + "github.com/nsf/termbox-go" +) + +// NewEdit creates a new edit mode +func NewEdit() { + edit = &Edit{moved: true} +} + +// EnabledEditMode enable edit mode +func (edit *Edit) EnabledEditMode() { + if edit.y > board.height-1 { + edit.y = board.height - 1 + } + if edit.x > board.width-1 { + edit.x = board.width - 1 + } + edit.moved = true +} + +// DisableEditMode disable edit mode +func (edit *Edit) DisableEditMode() { + err := saveUserBoards() + if err != nil { + logger.Fatal("error saving user boards:", err) + } +} + +// BoardSizeMode changed to board size edit mode +func (edit *Edit) BoardSizeMode() { + edit.width = board.width + edit.height = board.height + edit.boardSize = true +} + +// BoardWidthIncrement board width increment +func (edit *Edit) BoardWidthIncrement() { + if edit.width > 39 { + return + } + edit.width++ +} + +// BoardWidthDecrement board width decrement +func (edit *Edit) BoardWidthDecrement() { + if edit.width < 9 { + return + } + edit.width-- +} + +// BoardHeightIncrement board height increment +func (edit *Edit) BoardHeightIncrement() { + if edit.height > 39 { + return + } + edit.height++ +} + +// BoardHeightDecrement board height decrement +func (edit *Edit) BoardHeightDecrement() { + if edit.height < 9 { + return + } + edit.height-- +} + +// ChangeBoardSize create new board +func (edit *Edit) ChangeBoardSize() { + ChangeBoardSize(edit.width, edit.height) + edit.boardSize = false +} + +// EmptyBoard removes all blocks/colors from the board +func (edit *Edit) EmptyBoard() { + board.EmptyBoard() +} + +// CursorUp move cursor up +func (edit *Edit) CursorUp() { + if !edit.moved { + edit.moved = true + } + if edit.y < 1 { + return + } + edit.y-- +} + +// CursorDown move cursor down +func (edit *Edit) CursorDown() { + if !edit.moved { + edit.moved = true + } + if edit.y == board.height-1 { + return + } + edit.y++ +} + +// CursorRight move cursor right +func (edit *Edit) CursorRight() { + if !edit.moved { + edit.moved = true + } + if edit.x == board.width-1 { + return + } + edit.x++ +} + +// CursorLeft move cursor left +func (edit *Edit) CursorLeft() { + if !edit.moved { + edit.moved = true + } + if edit.x < 1 { + return + } + edit.x-- +} + +// SetColor sets the board color +func (edit *Edit) SetColor(color termbox.Attribute) { + if edit.moved { + edit.moved = false + } + if edit.saved { + edit.saved = false + } + board.SetColor(edit.x, edit.y, color, -1) +} + +// RotateLeft rotates cell left +func (edit *Edit) RotateLeft() { + if edit.moved { + edit.moved = false + } + if edit.saved { + edit.saved = false + } + board.RotateLeft(edit.x, edit.y) +} + +// RotateRight rotates cell right +func (edit *Edit) RotateRight() { + if edit.moved { + edit.moved = false + } + if edit.saved { + edit.saved = false + } + board.RotateRight(edit.x, edit.y) +} + +// DrawCursor draws the cursor location when cursor moves +func (edit *Edit) DrawCursor() { + if !edit.moved { + return + } + board.DrawCursor(edit.x, edit.y) +} + +// SaveBoard save board +func (edit *Edit) SaveBoard() { + if board.boardsIndex < numInternalBoards { + edit.SaveBoardNew() + return + } + boards[board.boardsIndex].colors = board.colors + boards[board.boardsIndex].rotation = board.rotation + if !edit.saved { + edit.saved = true + } +} + +// SaveBoardNew save board as new board +func (edit *Edit) SaveBoardNew() { + aBoards := Boards{name: time.Now().Format("Jan 2 3:4:5")} + aBoards.colors = make([][]termbox.Attribute, len(board.colors)) + for i := 0; i < len(board.colors); i++ { + aBoards.colors[i] = append(aBoards.colors[i], board.colors[i]...) + } + aBoards.rotation = make([][]int, len(board.rotation)) + for i := 0; i < len(board.rotation); i++ { + aBoards.rotation[i] = append(aBoards.rotation[i], board.rotation[i]...) + } + boards = append(boards, aBoards) + board.boardsIndex = len(boards) - 1 + if !edit.saved { + edit.saved = true + } +} + +// DeleteBoard deletes a board +func (edit *Edit) DeleteBoard() { + if board.boardsIndex < numInternalBoards { + return + } + boards = append(boards[:board.boardsIndex], boards[board.boardsIndex+1:]...) + board.boardsIndex-- + board.Clear() +} diff --git a/engine.go b/engine.go index d435260..0682cd7 100644 --- a/engine.go +++ b/engine.go @@ -48,7 +48,7 @@ loop: engine.tick() case <-engine.aiTimer.C: engine.ai.ProcessQueue() - engine.aiTimer.Reset(engine.tickTime / 6) + engine.aiTimer.Reset(engine.tickTime / aiTickDivider) case <-engine.chanStop: break loop } @@ -93,7 +93,7 @@ func (engine *Engine) Pause() { func (engine *Engine) UnPause() { engine.timer.Reset(engine.tickTime) if engine.aiEnabled { - engine.aiTimer.Reset(engine.tickTime / 6) + engine.aiTimer.Reset(engine.tickTime / aiTickDivider) } engine.paused = false } @@ -246,7 +246,7 @@ loop: func (engine *Engine) EnabledAi() { engine.aiEnabled = true go engine.ai.GetBestQueue() - engine.aiTimer.Reset(engine.tickTime / 6) + engine.aiTimer.Reset(engine.tickTime / aiTickDivider) } // DisableAi disables the AI @@ -259,3 +259,15 @@ func (engine *Engine) DisableAi() { } } } + +// EnabledEditMode enables edit mode +func (engine *Engine) EnabledEditMode() { + edit.EnabledEditMode() + engine.editMode = true +} + +// DisableEditMode disables edit mode +func (engine *Engine) DisableEditMode() { + edit.DisableEditMode() + engine.editMode = false +} diff --git a/globals.go b/globals.go index 4e97770..befc3c6 100644 --- a/globals.go +++ b/globals.go @@ -8,10 +8,12 @@ import ( ) const ( - blankColor = termbox.ColorBlack - boardXOffset = 4 - boardYOffset = 2 - rankingFileName = "/tetris.db" + blankColor = termbox.ColorBlack + boardXOffset = 4 + boardYOffset = 2 + aiTickDivider = 8 + rankingFileName = "/go-tetris.db" + settingsFileName = "/go-tetris.json" // MinoPreview is for the preview mino MinoPreview MinoType = iota @@ -57,12 +59,20 @@ type ( dropDistance int } - // Boards holds all the premade boards + // Boards holds all the boards Boards struct { + name string colors [][]termbox.Attribute rotation [][]int } + // BoardsJSON is for JSON format of boards + BoardsJSON struct { + Name string + Mino [][]string + Rotation [][]int + } + // KeyInput is the key input engine KeyInput struct { stopped bool @@ -103,16 +113,35 @@ type ( ai *Ai aiEnabled bool aiTimer *time.Timer + editMode bool + } + + // Edit is the board edit mode + Edit struct { + x int + y int + moved bool + boardSize bool + width int + height int + saved bool + } + + // Settings is the JSON load/save file + Settings struct { + Boards []BoardsJSON } ) var ( - boards []Boards - baseDir string logger *log.Logger minos *Minos board *Board view *View engine *Engine + edit *Edit + + boards []Boards + numInternalBoards int ) diff --git a/keyInput.go b/keyInput.go index 12bd0d4..f76f6a5 100644 --- a/keyInput.go +++ b/keyInput.go @@ -40,7 +40,7 @@ loop: // ProcessEvent process the key input event func (keyInput *KeyInput) ProcessEvent(event *termbox.Event) { - if event.Key == termbox.KeyCtrlI { + if event.Key == termbox.KeyCtrlL { // Ctrl l (lower case L) to log stack trace buffer := make([]byte, 1<<16) length := runtime.Stack(buffer, true) @@ -49,6 +49,73 @@ func (keyInput *KeyInput) ProcessEvent(event *termbox.Event) { return } + if engine.editMode { + if edit.boardSize { + switch event.Ch { + case 0: + switch event.Key { + case termbox.KeyArrowUp: + edit.BoardHeightIncrement() + case termbox.KeyArrowDown: + edit.BoardHeightDecrement() + case termbox.KeyArrowLeft: + edit.BoardWidthDecrement() + case termbox.KeyArrowRight: + edit.BoardWidthIncrement() + } + case 'q': + edit.ChangeBoardSize() + } + } else { + switch event.Ch { + case 0: + switch event.Key { + case termbox.KeyArrowUp: + edit.CursorUp() + case termbox.KeyArrowDown: + edit.CursorDown() + case termbox.KeyArrowLeft: + edit.CursorLeft() + case termbox.KeyArrowRight: + edit.CursorRight() + case termbox.KeyCtrlB: + edit.BoardSizeMode() + case termbox.KeyCtrlS: + edit.SaveBoard() + case termbox.KeyCtrlN: + edit.SaveBoardNew() + case termbox.KeyCtrlK: + edit.DeleteBoard() + case termbox.KeyCtrlO: + edit.EmptyBoard() + case termbox.KeyCtrlQ, termbox.KeyCtrlC: + engine.DisableEditMode() + } + case 'c': + edit.SetColor(termbox.ColorCyan) + case 'b': + edit.SetColor(termbox.ColorBlue) + case 'w': + edit.SetColor(termbox.ColorWhite) + case 'e': + edit.SetColor(termbox.ColorYellow) + case 'g': + edit.SetColor(termbox.ColorGreen) + case 'a': + edit.SetColor(termbox.ColorMagenta) + case 'r': + edit.SetColor(termbox.ColorRed) + case 'f': + edit.SetColor(blankColor) + case 'z': + edit.RotateLeft() + case 'x': + edit.RotateRight() + } + } + return + } + if event.Ch == 'q' || event.Key == termbox.KeyCtrlC { if !keyInput.stopped { keyInput.stopped = true @@ -67,6 +134,8 @@ func (keyInput *KeyInput) ProcessEvent(event *termbox.Event) { board.PreviousBoard() case termbox.KeyArrowRight: board.NextBoard() + case termbox.KeyCtrlE: + engine.EnabledEditMode() } } return @@ -89,7 +158,8 @@ func (keyInput *KeyInput) ProcessEvent(event *termbox.Event) { return } - if event.Ch == 0 { + switch event.Ch { + case 0: switch event.Key { case termbox.KeySpace: board.MinoDrop() @@ -102,17 +172,14 @@ func (keyInput *KeyInput) ProcessEvent(event *termbox.Event) { case termbox.KeyArrowRight: board.MinoMoveRight() } - } else { - switch event.Ch { - case 'z': - board.MinoRotateLeft() - case 'x': - board.MinoRotateRight() - case 'p': - engine.Pause() - case 'i': - engine.EnabledAi() - } + case 'z': + board.MinoRotateLeft() + case 'x': + board.MinoRotateRight() + case 'p': + engine.Pause() + case 'i': + engine.EnabledAi() } } diff --git a/mino_test.go b/mino_test.go index 3e17b1d..0c495ea 100644 --- a/mino_test.go +++ b/mino_test.go @@ -24,6 +24,11 @@ func setupForTesting() { rand.Seed(1) + err := loadBoards() + if err != nil { + log.Fatal("error loading boards:", err) + } + NewMinos() NewBoard() NewEngine() diff --git a/screenshots/editmode.png b/screenshots/editmode.png new file mode 100644 index 0000000000000000000000000000000000000000..670fc0960e87489c9be7d7c95490e64d54a25473 GIT binary patch literal 13796 zcmd6O2|S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(}jqx zZ<eX<-QSIY7oxXo_w zyytj{Hg`93fm%wzQGGiBkVA{qV`${~TN*Rj01iT5xTaQBkTIjs76(H7T9@BAAv9E@KUo#zJD z``)iw>`(nkgc__UT{M+*wUyKHH4m_(FA`8NT1434fm5OcH!0Esor~&APa2{mHT6K_ z$i(im`z|a=o^)8P`fmVSgWRTXVWoyz9g^>Z3F+87+`7cUtFjK@XkHo^cB2v{*gIzEpYvyi(4r9dzn1d z{fS&RBQiCgFp3s7lITs53NHGiyjZo(3M(st!Wv6FK56SzdeqWq$iq1o$>df+++)S| z3k&+~{JMlcqLL4W1{KoI2Bd2%quq2@PP>E!LR%5SJcGdjhe9TaX3MRoJKoYwjQJ>Y z!0)6LD(X6zvLkcxjR5c{1QM}{e0W2cQ|}(c0+G$lTGaj0A)M-v`t3o*@xCSOg+rT2%MTV;`@HohCKNkKo(;seADE=C;i0z- zqOe`Ts1+emSVjo}>baotLp)ic0}hLS(jK8Uj?#R6Jf{wdB=-y z^h)=i#W7N&!b@>6!Wy25C-2?kfetflcfmFAkk#8_OZLQTLwM-;8ZW&s!MgkPiwU~E z6zkd3AyEj<;Q7_Y1CXb6FH(YskL;jXK?S1kFK54}J}rIz4=dxlsyCU$*;RFRe8614 z9pKIvJ7>Ue)i%GSS@q3n+jcAT)JHSI6!`B_3US>!#q5PI9Gh3Ji8zWJ^P5cqYJ2jM uqV|XPP2Peweb=$V|NO~vdH0Qtaz*pcMl}r(V+Ym3(H~vxs}KKj`M&@KBo(9p diff --git a/screenshots/screenshot2.png b/screenshots/screenshot2.png deleted file mode 100644 index 6356c2f17615b11189d4046662f8a31d9dfb98b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5862 zcmdT|c{J4hzo%qpR3b5%@?^`BvJ{~aO_@rm)YxS$6Irv%AU$Qq6vj?SS;jJBDcQ2b zWH8xHWDPN73o~K5-yzTMx%ZxX&U4PafBf#8Gw00r{ds@i%j>Cav3JTdw`dX zjZNUfd3|FxHu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*|&2>8Ctyy{A8>G?0sF37?nj{SG(QE-0j#~-8gyPy>a>~eS<7H7(6-(b*Qp>C#U7cv&Hw~2kqc9 zlg25EP?J3#fBp#vfZgoYd71CaMv9$judFB0!G7#+z(<# z`jS0Nay*Q-EJ=~v@y3&>Eb5Wcr578XVLjbK^I?zo*N{Ua1LMnitOFg^9{6Gjpc5MG zcnb2@cb>Y$gi4UL8z43k>S_5J$oBL^UzX(TrPTZrsmv5&{jleI{b#+e(y~U-k%Vux z1v@SMLXA@hLUymT?$@57)IW+OIF0Ag03Z~*eG$QA@Z0zO--I#I)yiBrT!@aU8d1FHHbajaw2sx(u$fkRIG!-tx1d~AEAQn}*JZ&*KJkGtX5|-p iW18b1{FD556?P^_9;<lf%*qy7Vt0y6yo diff --git a/screenshots/screenshot3.png b/screenshots/screenshot3.png deleted file mode 100644 index a9f4016016f7f25ce273308386f1e48f9b1502a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8040 zcmd^E2{@GN+n;uIPNS0(iJ^{4Q=yZ63|f>Tgu=0mlO*GD3*4G{j`5!5G_Mw(p(6N$30jzyEiA*Y#c3w|K9MaX8 zxY15;|4AM2bxXB0Q(AqKAt_GDbf=L?dHI2K>s)Bnxt*JSIpG@i=is!+*nj+U$xsgT z^9$kZ!TC_Lm#_yQbpHRY&s)MK4ju5C&XtZ&`8c;;KXm)nmtnTi#%4pjtLgAfG4{l) z%E!CWQAaEkB#!5Fwe(m@!3-ZMORj!w!}4N3Tc3vin6U1$WmfRZkmjrP7DLsmDxS5J z*~7h#3@T6c{qcMAS0@z(%}0|`|C8OY?y+?W@MJ@}aE6*t2UhLOMMvJF9a)A7zPKS) zz{{G%I&`DH`ZFd23(lPps9d-Dmbadp;pH5Z4l$^zDTs-JNp|_KL(CkfX4+XMJpTp= z=U|6QIdYD&= z3^Y@Y-Rw-4h!SRv+)r^xly1=tas8>_po9CQ=Z(dAo%1lEe^UN>yGW&kph#`|tj#qt z;ShuQwK^pX^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xL8IkVbWD z8Bjx5h*wu~uIrCw@(tbZy8GmSn8lSVgqYk9k z-T(D5|4YhEkE%9D;imY)i;jziEm`O0!c+FQvValP|Ej+qW09}~7q*|}Szz~v&a>cG z6)tOf9*SNuZMktp+``+z#?!gQ9Y5Y8Oc!{0%D!)OSu=k7ahPq#MIGGvfFipU@V;kV zEkSZ%0$pCk1|;d(8a@-(!6I+kAy+*|;m;mEysZrxOVF$yWK*Y+eb#sKRSRvZe)wWg z5vJDZu6QU2ug@Dj7s1#*$}FKKq(w(Efj7}(;d6-OFD`2i-1wcCJXVmTJvD;O^~)oehJn{DB=roxBi;Jt7kzBrv;tke;Al#s2NdrcY5{jC!n3_BgzlaD6 z`J}vhtKXQRA?8APUU}5%%h6ljYzK~sBsnlt)6W2oQ_WM1UQ|~5oS1sv>)ivQ`7l2! z0=iYJqs`Pmf8|!A7hMhEQ&&^FPTvY(Hmg*dN5}%B{rjehFiyc?X9YMmCdoiM_c@%u z2I&1uhebC`GcNCbn{VMJjG`r+5XNvhbqNvr60K#)PL-xO#!=LQS>niEL=R74F{m+j zTlVHb&IPAzP>&taaL0?5XvIspEnKOU4#e3NL-xx=3COE*FBY` zemWZuM!sBya&4DJN98^JnE;6hf)xZbAB+lJHSRT`I@Q$m%G7V0;=Q}Nx)jwwr)m(X z<}SojV1^vuOmH=|H2`^<20fY6CRUi@;#8dGKu=WYcLo?!Yt{Vz^*7f4`1|Zjfr3>r X7gg?A!@(Ct8YhpL8|5DP{qny7OeDAU diff --git a/screenshots/screenshot4.png b/screenshots/screenshot4.png deleted file mode 100644 index 67e62b992a5bc25bf6242adeea137b32e8cde18c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6970 zcmd^^d05hEyT@%>EGM(H#>vVWO>xc2+_x4Rw?qT?t+dnxm&65eZ5^}HDRCEU(+C&P z95hA6$<*96LCpon5KIkG5ET_T&~j$p_dV}>opW91kF&tV#gAwEJLNYN*G>vy7(RUTJ=&_8UIu)>Au1f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g8ldp?w#$D`M z)#J>g?J9$k3~PRQcMekKB=j#e>o0XVDnrz@s|I7jeu9by`AAeuCN=aNa@x=7DDSXvwWSnsZjohMTF=EcbB+7EB zI{W&BNc)+euztf>Lb#Q_OuI-EOfo$R23x{IP3lPSbt(dYv@gb&S{BzS@Rj^Ihp5#K zP1^{wZXsuRA=>u1v2l|`yO7hDku$EIanQ(9X5_q}^sbu$L>N}kWnjW6RU_5-PcZn} zG}g>{Afq4{bZj%i&82+ou-K6Pn@8-$e19wWhyBqJM@90x6-TrBreXqJ{d)S{4d2mE zX{VyR&TO{T*s?W4l5heBlis6-{qdx(4CDUv_`$sfn(8`?WecZ5-NZ1n`p?F-=yNav zs@Yf0Hdk)qIOeP9G_K3enG=aZsuF)8ZuZ#V2ZxYu%5m02#Q7UG&7vcN7hUNy@);j6Fb`$7OFl{NAh3yHdC(V7B^j)>%__TDE(J>{RgW8kIINF zB`xpp_(CA!7+=8SvI98Es|i0^9>wNZAC=)*w*M44(}~ZPM^B~F@FI~HmtqCa?q*~e z>lAn;({#SJlp|GmYevnSXvLcKu<(1DvdON#JT&}y7j)Vr7DR)G@-h|6%>B@K$mumb!;6Yf3y;{Mb^7w14jGt`+$f(Wm8;(Knu`Mf2P?X|bzJmJcy~gg6E8hW zp6WVh_8}iVJ_IoDou59mfGpTq1pHV3O8tACaAPLD2BrVn Rc0^oca~5ccJALuSzXAMYTH^o! diff --git a/screenshots/tetris.png b/screenshots/tetris.png new file mode 100644 index 0000000000000000000000000000000000000000..cb0cb38ed2ea4579475c1b14fd0d2bbdc34cbd8d GIT binary patch literal 6127 zcmeHLdsNc*-?zDwt7fh&X_;87Wo7BI#3YqpsiQ0}gty_X?4~$$=KTWHDossUv&#&{ z(o}>Hn}T_zIK#Bt5?~7Rd_FT@+&hz~7d(L_Ec=+=9ysxj%>;3v5 zDQ+%s-PM~{YiVie9zW)AN=s`63HZzS3@K)*8)#q->2iTx*GQK$CRtc@;sN!mYD1Z4A zS$k#eNW{LEoD+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d!KK|I4}5~jzg|LtjYsDwh%B2ab~48yHkwtoohU^ i^#Ahf^FJAsG8VPrs~lvA3Hz1mjpL3k4kbrVfB#SV+rB&i literal 0 HcmV?d00001 diff --git a/tetris.go b/tetris.go index 0d0a0b3..8553dd2 100644 --- a/tetris.go +++ b/tetris.go @@ -13,20 +13,30 @@ func main() { logger = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.LUTC|log.Llongfile) logFile, err := os.OpenFile(baseDir+"/go-tetris.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644) if err != nil { - log.Fatal("error opening logFile:", err) + logger.Fatal("error opening log file:", err) } defer logFile.Close() logger.SetOutput(logFile) rand.Seed(time.Now().UnixNano()) + err = loadBoards() + if err != nil { + logger.Fatal("error loading internal boards:", err) + } + + err = loadUserBoards() + if err != nil { + logger.Fatal("error loading user boards:", err) + } + NewMinos() NewBoard() NewView() NewEngine() + NewEdit() engine.Run() view.Stop() - } diff --git a/view.go b/view.go index 2670838..7804b83 100644 --- a/view.go +++ b/view.go @@ -32,29 +32,53 @@ func (view *View) Stop() { func (view *View) RefreshScreen() { termbox.Clear(termbox.ColorDefault, termbox.ColorDefault) - view.drawBackground() + view.drawBoardBoarder() + + if engine.editMode { + if edit.boardSize { + board.DrawBoard() + view.drawEditTextsBoardSize() + } else { + board.DrawBoard() + edit.DrawCursor() + view.drawEditTexts() + } + termbox.Flush() + return + } + + view.drawPreviewBoarder() view.drawTexts() if engine.previewBoard { board.DrawBoard() view.drawGameOver() - } else if engine.gameOver { - view.drawGameOver() - view.drawRankingScores() - } else if engine.paused { - view.drawPaused() - } else { - board.DrawBoard() - board.DrawPreviewMino() - board.DrawDropMino() - board.DrawCurrentMino() + termbox.Flush() + return } + if engine.gameOver { + view.drawGameOver() + view.drawRankingScores() + termbox.Flush() + return + } + + if engine.paused { + view.drawPaused() + termbox.Flush() + return + } + + board.DrawBoard() + board.DrawPreviewMino() + board.DrawDropMino() + board.DrawCurrentMino() termbox.Flush() } -// drawBackground draws the background -func (view *View) drawBackground() { +// drawBoard draws the board boarder +func (view *View) drawBoardBoarder() { // playing board xOffset := boardXOffset yOffset := boardYOffset @@ -70,12 +94,14 @@ func (view *View) drawBackground() { } } } +} - // piece preview - xOffset = boardXOffset + board.width*2 + 8 - yOffset = boardYOffset - xEnd = xOffset + 14 - yEnd = yOffset + 6 +// drawPreviewBoarder draws the preview boarder +func (view *View) drawPreviewBoarder() { + xOffset := boardXOffset + board.width*2 + 8 + yOffset := boardYOffset + xEnd := xOffset + 14 + yEnd := yOffset + 6 for x := xOffset; x < xEnd; x++ { for y := yOffset; y < yEnd; y++ { if x == xOffset || x == xOffset+1 || x == xEnd-1 || x == xEnd-2 || @@ -112,10 +138,6 @@ func (view *View) drawTexts() { // ascii arrow characters add extra two spaces view.drawText(xOffset, yOffset, "← - left", termbox.ColorWhite, termbox.ColorBlack) yOffset++ - view.drawText(xOffset, yOffset, "z - rotate left", termbox.ColorWhite, termbox.ColorBlack) - yOffset++ - view.drawText(xOffset, yOffset, "x - rotate right", termbox.ColorWhite, termbox.ColorBlack) - yOffset++ view.drawText(xOffset, yOffset, "→ - right", termbox.ColorWhite, termbox.ColorBlack) yOffset++ view.drawText(xOffset, yOffset, "↓ - soft drop", termbox.ColorWhite, termbox.ColorBlack) @@ -124,21 +146,116 @@ func (view *View) drawTexts() { yOffset++ view.drawText(xOffset, yOffset, "sbar - hard drop", termbox.ColorWhite, termbox.ColorBlack) yOffset++ + view.drawText(xOffset, yOffset, "z - rotate left", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "x - rotate right", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ view.drawText(xOffset, yOffset, "p - pause", termbox.ColorWhite, termbox.ColorBlack) yOffset++ view.drawText(xOffset, yOffset, "q - quit", termbox.ColorWhite, termbox.ColorBlack) } +// drawEditTexts draws the edit text +func (view *View) drawEditTexts() { + xOffset := boardXOffset + board.width*2 + 8 + yOffset := boardYOffset + + view.drawText(xOffset, yOffset, "Name:", termbox.ColorWhite, termbox.ColorBlue) + view.drawText(xOffset+7, yOffset, boards[board.boardsIndex].name, termbox.ColorBlack, termbox.ColorWhite) + yOffset++ + view.drawText(xOffset, yOffset, "Saved:", termbox.ColorWhite, termbox.ColorBlue) + if edit.saved { + view.drawText(xOffset+7, yOffset, "yes", termbox.ColorBlack, termbox.ColorWhite) + } else { + view.drawText(xOffset+7, yOffset, "no", termbox.ColorBlack, termbox.ColorWhite) + } + + yOffset += 2 + + // ascii arrow characters add extra two spaces + view.drawText(xOffset, yOffset, "← - left", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "→ - right", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "↓ - down", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "↑ - up", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "z - rotate left", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "x - rotate right", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "c - cyan", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "b - blue", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "w - white", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "e - yellow", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "g - green", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "a - magenta", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "r - red", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "f - free", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl b - change board size", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl s - save board", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl n - save board as new", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl k - delete board", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl o - empty board", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "ctrl q - quit", termbox.ColorWhite, termbox.ColorBlack) +} + +// drawEditTextsBoardSize draws the edit text for board size mode +func (view *View) drawEditTextsBoardSize() { + xOffset := boardXOffset + board.width*2 + 8 + yOffset := boardYOffset + + view.drawText(xOffset, yOffset, "Name:", termbox.ColorWhite, termbox.ColorBlue) + view.drawText(xOffset+7, yOffset, boards[board.boardsIndex].name, termbox.ColorBlack, termbox.ColorWhite) + + yOffset += 2 + + view.drawText(xOffset, yOffset, "Size:", termbox.ColorWhite, termbox.ColorBlue) + view.drawText(xOffset+7, yOffset, fmt.Sprintf("%2d X %2d", edit.width, edit.height), termbox.ColorBlack, termbox.ColorWhite) + + yOffset += 2 + + // ascii arrow characters add extra two spaces + view.drawText(xOffset, yOffset, "← - board width decrement", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "→ - board width increment", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "↓ - board height decrement", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "↑ - board height increment", termbox.ColorWhite, termbox.ColorBlack) + yOffset++ + view.drawText(xOffset, yOffset, "q - done", termbox.ColorWhite, termbox.ColorBlack) +} + // DrawPreviewMinoBlock draws the preview mino func (view *View) DrawPreviewMinoBlock(x int, y int, color termbox.Attribute, rotation int, length int) { - var char1 rune - var char2 rune - if rotation < 2 { - char1 = '▓' - char2 = ' ' - } else { - char1 = ' ' - char2 = '▓' + char1 := ' ' + char2 := ' ' + switch rotation { + case 0: + char1 = '▄' + char2 = '▄' + case 1: + char1 = '█' + case 2: + char1 = '▀' + char2 = '▀' + case 3: + char2 = '█' } xOffset := 2*x + 2*board.width + boardXOffset + 11 + (4 - length) termbox.SetCell(xOffset, y+boardYOffset+2, char1, color, color^termbox.AttrBold) @@ -147,14 +264,19 @@ func (view *View) DrawPreviewMinoBlock(x int, y int, color termbox.Attribute, ro // DrawBlock draws a block func (view *View) DrawBlock(x int, y int, color termbox.Attribute, rotation int) { - var char1 rune - var char2 rune - if rotation < 2 { - char1 = '▓' - char2 = ' ' - } else { - char1 = ' ' - char2 = '▓' + char1 := ' ' + char2 := ' ' + switch rotation { + case 0: + char1 = '▄' + char2 = '▄' + case 1: + char1 = '█' + case 2: + char1 = '▀' + char2 = '▀' + case 3: + char2 = '█' } if color == blankColor { // blankColor means drop Mino @@ -304,3 +426,10 @@ func (view *View) colorizeLine(y int, color termbox.Attribute) { termbox.SetCell(x*2+boardXOffset+3, y+boardYOffset+1, ' ', termbox.ColorDefault, color) } } + +// DrawCursor draws current cursor location +func (view *View) DrawCursor(x int, y int, color termbox.Attribute) { + termbox.SetCell(x*2+boardXOffset+2, y+boardYOffset+1, '◄', color^termbox.AttrBold, termbox.ColorBlack^termbox.AttrBold) + termbox.SetCell(x*2+boardXOffset+3, y+boardYOffset+1, '►', color^termbox.AttrBold, termbox.ColorBlack^termbox.AttrBold) + termbox.Flush() +}