初始化拼图块-vb.net开发游戏第6-10章

初始化拼图块Private Sub Reset() For i As Integer = 0 To CHIP_COUNT - 1 m_chipList(i) = New CChip() Next Dim pointList As Point() = New Point(MAX_POINTS - 1) {} pointList(0).X = DELTA pointList(0).Y = DELTA pointList(1).X = DELTA + CHIP_WIDTH pointList(1).Y = DELTA pointList(2).X = DELTA + CHIP_WIDTH 2 pointList(2).Y = DELTA + CHIP_WIDTH 2 'm_chipList[0]为一个头朝下的正三角形m_chipList(0).SetChip(1, pointList, 3) …… pointList(0).X = DELTA pointList(0).Y = DELTA + CHIP_WIDTH pointList(1).X = DELTA + CHIP_WIDTH 4 pointList(1).Y = DELTA + (CHIP_WIDTH * 3) 4 pointList(2).X = DELTA + (CHIP_WIDTH * 3) 4 pointList(2).Y = DELTA + (CHIP_WIDTH * 3) 4 pointList(3).X = DELTA + CHIP_WIDTH 2 pointList(3).Y = DELTA + CHIP_WIDTH 'm_chipList[6]为一个的平行四边形m_chipList(6).SetChip(7, pointList, 4) End Sub
ppt 文件大小:2.53MB