VC6.0 테트리스 만들기 – 벽돌(Shape) 모양

 

Shape – 벽돌의 모양 만들기

   

Shape 모양은 CShape 를 상속받아 모양만 만들어 주면 됩니다.

 

 

Shape1

 

CShape1::CShape1()

{

    SetOneBlocks(0,COneBlock(0,0),     COneBlock(0,1), COneBlock(1,0)    COneBlock(1,1) );

    SetOneBlocks(1,COneBlock(0,0),     COneBlock(0,1), COneBlock(1,0), COneBlock(1,1) );

    SetOneBlocks(2,COneBlock(0,0),     COneBlock(0,1), COneBlock(1,0), COneBlock(1,1) );

    SetOneBlocks(3,COneBlock(0,0),     COneBlock(0,1), COneBlock(1,0), COneBlock(1,1) );

}

 

 

 

 

Shape2

 

 

CShape2::CShape2()

{

    SetOneBlocks(0,COneBlock(0,1),     COneBlock(1,1),    COneBlock(2,1),    COneBlock(3,1));

    SetOneBlocks(1,COneBlock(1,0),     COneBlock(1,1), COneBlock(1,2),COneBlock(1,3));

    SetOneBlocks(2,COneBlock(0,1),     COneBlock(1,1), COneBlock(2,1), COneBlock(3,1));

    SetOneBlocks(3,COneBlock(1,0),     COneBlock(1,1), COneBlock(1,2), COneBlock(1,3));

}

 

 

 

 

Shape3

 

 

CShape3::CShape3()

{

    SetOneBlocks(0,COneBlock(0,1),     COneBlock(1,1),    COneBlock(1,0),    COneBlock(1,2));

    SetOneBlocks(1,COneBlock(0,1),     COneBlock(1,1),    COneBlock(1,0),    COneBlock(2,1));

    SetOneBlocks(2,COneBlock(2,1),     COneBlock(1,1),    COneBlock(1,0),    COneBlock(1,2));

    SetOneBlocks(3,COneBlock(0,1),     COneBlock(1,1),    COneBlock(2,1),    COneBlock(1,2));

}

 

 

 

 

Shape4

 

 

 

CShape4::CShape4()

{

    SetOneBlocks(0,COneBlock(0,0),     COneBlock(1,0),    COneBlock(1,1),    COneBlock(1,2));

    SetOneBlocks(1,COneBlock(2,0),     COneBlock(0,1),    COneBlock(1,1),    COneBlock(2,1));

    SetOneBlocks(2,COneBlock(0,0),     COneBlock(0,1),    COneBlock(0,2),    COneBlock(1,2));

    SetOneBlocks(3,COneBlock(0,0),     COneBlock(1,0),    COneBlock(2,0),    COneBlock(0,1));

}

 

 

 

 

Shape5

 

 

 

CShape5::CShape5()

{

    SetOneBlocks(0,COneBlock(0,2),     COneBlock(1,0),    COneBlock(1,1),    COneBlock(1,2));

    SetOneBlocks(1,COneBlock(0,0),     COneBlock(0,1),    COneBlock(1,1),    COneBlock(2,1));

    SetOneBlocks(2,COneBlock(0,0),     COneBlock(1,0),    COneBlock(0,1),    COneBlock(0,2));

    SetOneBlocks(3,COneBlock(0,0),     COneBlock(1,0),    COneBlock(2,0),    COneBlock(2,1));

}

 

 

 

 

Shape6

 

 

 

CShape6::CShape6()

{

    SetOneBlocks(0,COneBlock(0,0),    COneBlock(0,1),    COneBlock(1,1),    COneBlock(1,2));

    SetOneBlocks(1,COneBlock(1,0), COneBlock(2,0), COneBlock(0,1),COneBlock(1,1));

    SetOneBlocks(2,COneBlock(0,0), COneBlock(0,1), COneBlock(1,1),COneBlock(1,2));

    SetOneBlocks(3,COneBlock(1,0), COneBlock(2,0), COneBlock(0,1),COneBlock(1,1));

}

 

 

 

 

Shape7

 

 

 

CShape7::CShape7()

{

    SetOneBlocks(0,COneBlock(1,0),     COneBlock(0,1),    COneBlock(1,1),    COneBlock(0,2));

    SetOneBlocks(1,COneBlock(0,0),     COneBlock(1,0),    COneBlock(1,1),    COneBlock(2,1));

    SetOneBlocks(2,COneBlock(1,0),     COneBlock(0,1),    COneBlock(1,1),    COneBlock(0,2));

    SetOneBlocks(3,COneBlock(0,0),     COneBlock(1,0),    COneBlock(1,1),    COneBlock(2,1));

}


Leave a Comment