Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void xulyDiChuyen() {
- mainView.getInGameFrame().addKeyListener(new KeyAdapter() {
- private void move(Direction direction) {
- if (!mainModel.onTile(MapElement.ROCK, direction)) {
- if (mainModel.onTile(MapElement.QUESTION, direction)) {
- // khi đi lên ô câu hỏi, thực thi xulyGapCauHoi();
- xulyGapCauHoi();
- }
- mainModel.moveBear(direction);
- }
- }
- }
- public void xulyGapCauHoi() {
- mainModel.updateQuestionIndex();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement