Page 178 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 178

}

                                 while(1)
                                 {

                                       if(DOWN_LIMIT) break;
                                       else M_DOWN;

                                 }
                                 lcd_gotoxy(0,0);

                                 lcd_puts("      Thank  you!     ");
                                 lcd_gotoxy(0,1);

                                 lcd_puts("      Come again     ");
                                 GAMEOVER_SIG_ON;

                                            delay_ms(3000);
                                 game_state=INIT;

                                 break;
                            }

                            default :
                            {

                                 GAMEOVER_SIG_OFF;
                                 game_state  =  INIT;

                            }
                       }

                 }
            }



            interrupt  [TIM0_OVF]  void  timer_int0(void)

            {
                 if(game_state==START)

                 {
                       if(time_count==REAL_TIME)

                       {
                            time_count=0;

                            if(game_time_count==0)  game_time_count=0;
                            else  game_time_count  =  game_time_count-1;




                                                         -  171  -
   173   174   175   176   177   178   179   180   181   182   183