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)); } |
'스터디 > MFC 테트리스' 카테고리의 다른 글
[01]윈도우 프로그램 껍데기 만들기 (0) | 2011.01.05 |
---|---|
VC6.0 테트리스 만들기 – 보드(게임판 구성) (0) | 2011.01.01 |
VC6.0 테트리스 만들기 – 벽돌(Shape)만들기 (0) | 2010.12.29 |
VC6.0 테트리스 만들기 - OneBlock 구조 (0) | 2010.12.28 |
VC6.0 테트리스 만들기 - 구조 (0) | 2010.12.28 |