Commit 725af563 authored by santiaago's avatar santiaago
Browse files

simplify hasFoot.

parent 8b9ccd06
Loading
Loading
Loading
Loading
+18 −22
Original line number Diff line number Diff line
@@ -696,7 +696,6 @@ func hasFoot(invader invader, lowBodyIndex, xQ, yQ int) (foot bool) {
		return
	}

	if invader.legs%2 == 0 {
	if invader.legs == 2 {
		if isOneOfTheTwoFeet(xQ) {
			foot = true
@@ -705,9 +704,7 @@ func hasFoot(invader invader, lowBodyIndex, xQ, yQ int) (foot bool) {
		if isOneOfTheFourFeet(xQ) {
			foot = true
		}
		}
	} else {
		if invader.legs == 1 {
	} else if invader.legs == 1 {
		if isOneFoot(xQ) {
			foot = true
		}
@@ -720,7 +717,6 @@ func hasFoot(invader invader, lowBodyIndex, xQ, yQ int) (foot bool) {
			foot = true
		}
	}
	}

	return
}