diff --git a/main.go b/main.go index aee9e03..5b27ee2 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "image/color" "tetris/assets" + "tetris/engine/core" "tetris/engine/graphics" "tetris/engine/render" "tetris/game" @@ -18,7 +19,7 @@ func createGrid() *game.Grid { grid := &game.Grid{} c := 0 - for y := range byte(grid.Height() - 2) { + for y := range byte(grid.Height() - 4) { for x := range byte(grid.Width()) { grid.Set(x, y, game.Block((c%7)+1)) c++ @@ -29,6 +30,8 @@ func createGrid() *game.Grid { } func main() { + shape := game.NewShape(game.SHAPE_O) + shape_pos := core.Vec2i8{X: 1, Y: 13} grid := createGrid() // Set random blocks to test @@ -61,6 +64,7 @@ func main() { for !rl.WindowShouldClose() { render.Begin(r.Theme.GridBackground) r.DrawGrid(rl.NewVector2(25, 25), grid) + draw.DrawShape(rl.NewVector2(25, 25), shape_pos, shape) r.DrawFrame(rl.RectangleInt32{X: 400, Y: 25, Width: 250, Height: 100}) r.DrawHeaderText(410, 30, "Score") r.DrawText(410, 65, "999999")