its better to use thread to stop the game its a demo version , so will implement it in the later version concode_field_sep int BOARD_LENGTH concode_elem_sep Player nextPlayer concode_elem_sep int PLAYER_0NE_BIG_PIT concode_elem_sep int pitNo concode_elem_sep Player winner concode_elem_sep Logger logger concode_elem_sep int counterScorePlayer2 concode_elem_sep int counterScorePlayer1 concode_elem_sep Player[] players concode_elem_sep int PLAYER_TWO_BIG_PIT concode_elem_sep long serialVersionUID concode_elem_sep boolean terminate concode_elem_sep int STONES_IN_PIT concode_elem_sep List<Pit> boardPits concode_field_sep void setNextPlayer concode_elem_sep void setPlayers concode_elem_sep void setTerminate concode_elem_sep List<Pit> getBoardPits concode_elem_sep int getCounterScorePlayer2 concode_elem_sep int getCounterScorePlayer1 concode_elem_sep void checkNextPlayer concode_elem_sep boolean isTerminate concode_elem_sep void moveAndPlay concode_elem_sep Player getWinner concode_elem_sep void setCounterScorePlayer1 concode_elem_sep void calculateScore concode_elem_sep int nextPosition concode_elem_sep void setCounterScorePlayer2 concode_elem_sep Player getNextPlayer concode_elem_sep void setWinner concode_elem_sep boolean checkEmptyPits concode_elem_sep void setPitNo concode_elem_sep Player[] getPlayers concode_elem_sep void setBoardPits concode_elem_sep int getPitNo
void function ( ) { if ( isTerminate ( ) ) { System . exit ( 0 ) ; } }