https://github.com/kaatinga/chess-board-generator
An example of a chess board generator in PNG
https://github.com/kaatinga/chess-board-generator
Last synced: 3 months ago
JSON representation
An example of a chess board generator in PNG
- Host: GitHub
- URL: https://github.com/kaatinga/chess-board-generator
- Owner: kaatinga
- Created: 2019-11-11T07:25:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T08:21:46.000Z (over 6 years ago)
- Last Synced: 2023-03-21T21:14:52.956Z (about 3 years ago)
- Language: Go
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chess-board-generator
The package is a showcase of a chess board generator.
An example of a chess board generator in PNG is below:
```
package main
import (
Board "github.com/kaatinga/chess-board-generator"
)
func main() {
step := 50
Board.Init()
Board.PlacePiece(50, 50, step, Board.WhiteTower)
Board.PlacePiece(100, 50, step, Board.WhitePawn)
Board.PlacePiece(250, 50, step, Board.BlackTower)
Board.PlacePiece(100, 250, step, Board.WhiteHorse)
Board.PlacePiece(150, 250, step, Board.WhiteKing)
Board.PlacePiece(350, 50, step, Board.BlackKing)
Board.PlacePiece(300, 300, step, Board.BlackQueen)
Board.Save("test.png")
}
```
The result:
