Clean up of code.
This commit is contained in:
parent
371de84218
commit
0d7a141830
14
game.go
14
game.go
@ -169,22 +169,8 @@ func quit(game *Game) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (game *Game) randPos() Position {
|
func (game *Game) randPos() Position {
|
||||||
//var safe bool = false
|
|
||||||
var pos Position
|
var pos Position
|
||||||
|
|
||||||
// for !safe {
|
|
||||||
// x := rand.Intn(80)
|
|
||||||
// y := rand.Intn(24)
|
|
||||||
|
|
||||||
// if x == 0 || x == 79 || y == 0 || y == 23 {
|
|
||||||
// safe = false
|
|
||||||
// } else {
|
|
||||||
// pos.x = x
|
|
||||||
// pos.y = y
|
|
||||||
// safe = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
x := 1 + rand.Intn(77)
|
x := 1 + rand.Intn(77)
|
||||||
y := 1 + rand.Intn(22)
|
y := 1 + rand.Intn(22)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user