1
0
forked from freqy/randomHearts

added large hearts and stuff

This commit is contained in:
Maxine Filcher 2021-01-09 20:18:37 -08:00
parent 8a41d4bae5
commit 8974c815bf

@ -47,69 +47,6 @@ var words = flag.String("w", "", "words to be displayed")
@@ 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) {
//First Line
for i := 0; i <= 13+x; i++ {
@ -175,7 +112,170 @@ func smHeart(x int) {
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
@ -187,30 +287,24 @@ func randomMod() int {
}
//returns the hieght of the art "y" and
// and the WS line position "x"
func pos(x int, y int) (int, int) {
func pos(x int) (int, int) {
//xO := x + randomMod()
return x + randomMod(), y
return x + randomMod(), randomMod()
}
//Basically conrtols printing everything
func whSp(in int) {
x, y := pos(in, 6)
x, y := pos(in)
switch y {
case 6:
switch {
case y <= 20:
smHeart(x)
case 7:
case y <= 40:
medHeart(x)
case 10:
//large
case y <= 60:
lrgHeart(x)
}
}
func main() {