public void isClickChar(Character_model tem_char) { if (Move_model.can_move == 1) { return; } if (tem_char._isOnBoat()) { Coast_model tem_coast; if (boat.getflag() == -1) { tem_coast = toCoast; } else { tem_coast = fromCoast; } boat.getOffBoat(tem_char.getName()); tem_char.moveToPosition(tem_coast.getEmptyPosition()); tem_char.getOnCoast(tem_coast); tem_coast.getOnCoast(tem_char); } else { Coast_model tem_coast2 = tem_char.getcoastmodel(); if (boat.getEmptyIndex() == -1) { return; } if (boat.getflag() != tem_coast2.getflag()) { return; } tem_coast2.getOffCoast(tem_char.getName()); tem_char.moveToPosition(boat.getEmptyPosition()); tem_char.getOnBoat(boat); boat.getOnBoat(tem_char); } user.if_win_or_not = checkGameOver(); }