forked from freqy/randomHearts
added large hearts and stuff
This commit is contained in:
parent
8a41d4bae5
commit
8974c815bf
250
heartGenie.go
250
heartGenie.go
@ -47,69 +47,6 @@ var words = flag.String("w", "", "words to be displayed")
|
|||||||
@@ 10 + 0
|
@@ 10 + 0
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func medHeart(x int) {
|
|
||||||
for i := 0; i <= 16+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 8, x + 9, x + 10, x + 14, x + 15:
|
|
||||||
fmt.Print("@")
|
|
||||||
case x + 16:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := 0; i <= 17+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 7, x + 11, x + 13:
|
|
||||||
fmt.Print("@")
|
|
||||||
case x + 17:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := 0; i <= 16+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 8:
|
|
||||||
fmt.Print("@")
|
|
||||||
case x + 16:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := 0; i <= 15+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 9:
|
|
||||||
fmt.Print("@")
|
|
||||||
case x + 15:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := 0; i <= 13+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 11:
|
|
||||||
fmt.Print("@")
|
|
||||||
case x + 13:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for i := 0; i <= 12+x; i++ {
|
|
||||||
switch i {
|
|
||||||
default:
|
|
||||||
fmt.Print(" ")
|
|
||||||
case x + 12:
|
|
||||||
fmt.Println("@")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func smHeart(x int) {
|
func smHeart(x int) {
|
||||||
//First Line
|
//First Line
|
||||||
for i := 0; i <= 13+x; i++ {
|
for i := 0; i <= 13+x; i++ {
|
||||||
@ -175,7 +112,170 @@ func smHeart(x int) {
|
|||||||
fmt.Println("@")
|
fmt.Println("@")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func medHeart(x int) {
|
||||||
|
for i := 0; i <= 16+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 8, x + 9, x + 10, x + 14, x + 15:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 16:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i <= 17+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 7, x + 11, x + 13:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 17:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i <= 16+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 8:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 16:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i <= 15+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 9:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 15:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i <= 13+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 11:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 13:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i <= 12+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 12:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func lrgHeart(x int) {
|
||||||
|
//Line 1
|
||||||
|
for i := 0; i <= 17+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 6, x + 7, x + 8, x + 9, x + 14, x + 15, x + 16:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 17:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 2
|
||||||
|
for i := 0; i <= 18+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 5, x + 10, x + 6, x + 14:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 18:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 3
|
||||||
|
for i := 0; i <= 19+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 4, x + 11, x + 12:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 19:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 4
|
||||||
|
for i := 0; i <= 18+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 5:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 18:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 5
|
||||||
|
for i := 0; i <= 17+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 6:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 17:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 6
|
||||||
|
for i := 0; i <= 15+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 8:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 15:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 7
|
||||||
|
for i := 0; i <= 14+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 9:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 14:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 8
|
||||||
|
for i := 0; i <= 13+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 10:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 13:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Line 9
|
||||||
|
for i := 0; i <= 12+x; i++ {
|
||||||
|
switch i {
|
||||||
|
default:
|
||||||
|
fmt.Print(" ")
|
||||||
|
case x + 11:
|
||||||
|
fmt.Print("@")
|
||||||
|
case x + 12:
|
||||||
|
fmt.Println("@")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//rand num to modify x position
|
//rand num to modify x position
|
||||||
@ -187,30 +287,24 @@ func randomMod() int {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns the hieght of the art "y" and
|
func pos(x int) (int, int) {
|
||||||
// and the WS line position "x"
|
|
||||||
func pos(x int, y int) (int, int) {
|
|
||||||
|
|
||||||
//xO := x + randomMod()
|
return x + randomMod(), randomMod()
|
||||||
|
|
||||||
return x + randomMod(), y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Basically conrtols printing everything
|
||||||
func whSp(in int) {
|
func whSp(in int) {
|
||||||
|
|
||||||
x, y := pos(in, 6)
|
x, y := pos(in)
|
||||||
|
|
||||||
switch y {
|
switch {
|
||||||
case 6:
|
case y <= 20:
|
||||||
smHeart(x)
|
smHeart(x)
|
||||||
case 7:
|
case y <= 40:
|
||||||
medHeart(x)
|
medHeart(x)
|
||||||
|
case y <= 60:
|
||||||
case 10:
|
lrgHeart(x)
|
||||||
//large
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user