day22, example
This commit is contained in:
@@ -62,3 +62,26 @@ func TestSpaceSettleThirdOnTopFirst(t *testing.T) {
|
||||
// and that overlaps 1-1, 0-2 AND 0-0, 0-2
|
||||
t.Logf("other blocks should not supt %+v", block3.Supports)
|
||||
}
|
||||
|
||||
func TestSpaceExampleSettleAll(t *testing.T) {
|
||||
filename := "example"
|
||||
blocks := ReadBlockFile(filename)
|
||||
byZ := BlocksByZ(blocks)
|
||||
|
||||
space := NewSpace(byZ)
|
||||
space.SettleAll()
|
||||
|
||||
t.Logf("settled space %+v", space)
|
||||
|
||||
// maybe i can check via console.
|
||||
i := 2
|
||||
t.Logf("level %d is : %+v", i, space.SettledOnZ[i])
|
||||
// it looks ok for the example.
|
||||
// let's hope?
|
||||
|
||||
t.Logf("for example, free blocks amount is %d", space.CountFreeBlocks())
|
||||
// oh, i need 'supported'?
|
||||
// how do i need to count the task question
|
||||
// i guess we can start with set of all blocks, then?
|
||||
// run over all, if some block is only supported by some underBlock - remove that underblock
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user