Start with adding a render block, should expand on this.
This commit is contained in:
parent
8e10c82b67
commit
b2928ec073
23
render.go
Normal file
23
render.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "github.com/gdamore/tcell/v2"
|
||||||
|
|
||||||
|
/*
|
||||||
|
func renderScreen(&screen tcell.Screen, event tcell.Event, score int) {
|
||||||
|
if checkSize(*screen) == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
func checkSize(screen tcell.Screen) bool {
|
||||||
|
var retval bool = true
|
||||||
|
x, y := screen.Size()
|
||||||
|
if x < 80 {
|
||||||
|
retval = false
|
||||||
|
}
|
||||||
|
if y < 24 {
|
||||||
|
retval = false
|
||||||
|
}
|
||||||
|
return retval
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user