day24: adding python z3, example
This commit is contained in:
@@ -55,7 +55,7 @@ func TestIntersectExampleOne(t *testing.T) {
|
||||
hA := ReadHailLine("19, 13, 30 @ -2, 1, -2")
|
||||
hB := ReadHailLine("18, 19, 22 @ -1, -1, -2")
|
||||
|
||||
x, y, check := IntersectByTwoPoints(hA, hB)
|
||||
x, y, check := IntersectBySlopeAndShift(hA, hB)
|
||||
if !check {
|
||||
panic("should intersect")
|
||||
}
|
||||
@@ -68,7 +68,7 @@ func TestIntersectExampleTwo(t *testing.T) {
|
||||
hA := ReadHailLine("18, 19, 22 @ -1, -1, -2")
|
||||
hB := ReadHailLine("20, 25, 34 @ -2, -2, -4")
|
||||
|
||||
x, y, check := IntersectByTwoPoints(hA, hB)
|
||||
x, y, check := IntersectBySlopeAndShift(hA, hB)
|
||||
if check {
|
||||
panic("should not intersect")
|
||||
}
|
||||
@@ -78,6 +78,9 @@ func TestIntersectExampleTwo(t *testing.T) {
|
||||
func TestExamplePairwiseChecks(t *testing.T) {
|
||||
filename := "example"
|
||||
hails := ReadHailFile(filename)
|
||||
for _, hail := range hails {
|
||||
t.Log(hail)
|
||||
}
|
||||
|
||||
intersections := CheckPairwiseIntersections(hails)
|
||||
t.Log("counted intersections ", intersections)
|
||||
|
||||
Reference in New Issue
Block a user