코드를 짜기 전에도 적어도 3번은 생각하고 짜라



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
while(1){
                    what = inputDeployWhat();
                    
                    if( what == 1  &&  range1PieceNum < range1PieceNumMax ){
                        deployPiece( setSpots[index], pieceId, 1, what );
                        printPiece( piecesP1[pieceId], BLACK );
 
                        setSpots[index] = NULL;
 
                        pieceId++;
                        range1PieceNum++;
 
                        gotoXY( P1_INPUT_BOX_X, P1_INPUT_BOX_Y+2 ); setColor( RED, WHITE );
                        printf"남은 말 수 ●:%d ★:%d ③:%d ④:%d ⑤:%d ", range1PieceNumMax - range1PieceNum, 
                                                                        range2PieceNumMax - range2PieceNum,
                                                                        range3PieceNumMax - range3PieceNum,
                                                                        range4PieceNumMax - range4PieceNum,
                                                                        range5PieceNumMax - range5PieceNum );
                        break;
                    }
                    else if( what == 2  &&  range2PieceNum < range2PieceNumMax ){
                        deployPiece( setSpots[index], pieceId, 1, what );
                        printPiece( piecesP1[pieceId], BLACK );
 
                        setSpots[index] = NULL;
 
                        pieceId++;
                        range2PieceNum++;
 
                        gotoXY( P1_INPUT_BOX_X, P1_INPUT_BOX_Y+2 ); setColor( RED, WHITE );
                        printf"남은 말 수 ●:%d ★:%d ③:%d ④:%d ⑤:%d ", range1PieceNumMax - range1PieceNum, 
                                                                        range2PieceNumMax - range2PieceNum,
                                                                        range3PieceNumMax - range3PieceNum,
                                                                        range4PieceNumMax - range4PieceNum,
                                                                        range5PieceNumMax - range5PieceNum );
                        break;
                    }
                    else if( what == 3  &&  range3PieceNum < range3PieceNumMax ){
                        deployPiece( setSpots[index], pieceId, 1, what );
                        printPiece( piecesP1[pieceId], BLACK );
 
                        setSpots[index] = NULL;
 
                        pieceId++;
                        range3PieceNum++;
 
                        gotoXY( P1_INPUT_BOX_X, P1_INPUT_BOX_Y+2 ); setColor( RED, WHITE );
                        printf"남은 말 수 ●:%d ★:%d ③:%d ④:%d ⑤:%d ", range1PieceNumMax - range1PieceNum, 
                                                                        range2PieceNumMax - range2PieceNum,
                                                                        range3PieceNumMax - range3PieceNum,
                                                                        range4PieceNumMax - range4PieceNum,
                                                                        range5PieceNumMax - range5PieceNum );
                        break;
                    }
                    else if( what == 4  &&  range4PieceNum < range4PieceNumMax ){
                        deployPiece( setSpots[index], pieceId, 1, what );
                        printPiece( piecesP1[pieceId], BLACK );
 
                        setSpots[index] = NULL;
 
                        pieceId++;
                        range4PieceNum++;
 
                        gotoXY( P1_INPUT_BOX_X, P1_INPUT_BOX_Y+2 ); setColor( RED, WHITE );
                        printf"남은 말 수 ●:%d ★:%d ③:%d ④:%d ⑤:%d ", range1PieceNumMax - range1PieceNum, 
                                                                        range2PieceNumMax - range2PieceNum,
                                                                        range3PieceNumMax - range3PieceNum,
                                                                        range4PieceNumMax - range4PieceNum,
                                                                        range5PieceNumMax - range5PieceNum );
                        break;
                    }
                    else if( what == 5  &&  range5PieceNum < range5PieceNumMax ){
                        deployPiece( setSpots[index], pieceId, 1, what );
                        printPiece( piecesP1[pieceId], BLACK );
 
                        setSpots[index] = NULL;
 
                        pieceId++;
                        range5PieceNum++;
 
                        gotoXY( P1_INPUT_BOX_X, P1_INPUT_BOX_Y+2 ); setColor( RED, WHITE );
                        printf"남은 말 수 ●:%d ★:%d ③:%d ④:%d ⑤:%d ", range1PieceNumMax - range1PieceNum, 
                                                                        range2PieceNumMax - range2PieceNum,
                                                                        range3PieceNumMax - range3PieceNum,
                                                                        range4PieceNumMax - range4PieceNum,
                                                                        range5PieceNumMax - range5PieceNum );
                        break;
                    }
                    else{
                        continue;
                    }
 
                }
cs



으악 똥냄새

코드에 똥사지른 사람이 누구야?