-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.go
34 lines (32 loc) · 858 Bytes
/
game.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
// Load Font
// renderer.Clear()
// text, err := ttf.OpenFont(gamefont, 20)
// if err != nil {
// fmt.Println("Loading font: ", err)
// os.Exit(2)
// }
// defer text.Close()
// str := "ChessAI"
// // x, y, err := text.SizeUTF8(str)
// // xx := int32(x)
// // yy := int32(y)
// txtsurface, err := text.RenderUTF8Solid(str, sdl.Color{R: 102, G: 255, B: 214, A: 1})
// if err != nil {
// fmt.Println("creating text surface: ", err)
// os.Exit(2)
// }
// defer txtsurface.Free()
// tx, err := renderer.CreateTextureFromSurface(txtsurface)
// if err != nil {
// fmt.Println("creating texture of text: ", err)
// os.Exit(2)
// }
// defer tx.Destroy()
// renderer.SetDrawColor(3, 153, 255, 255)
// renderer.Copy(tx,
// nil,
// &sdl.Rect{X: 480, Y: 0, W: 480, H: 320})
// renderer.Present()
// time.Sleep(5 * time.Second)
// func ListentoMove