Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public void xulyDiChuyen() {
  2.         mainView.getInGameFrame().addKeyListener(new KeyAdapter() {
  3.             private void move(Direction direction) {
  4.  
  5.                 if (!mainModel.onTile(MapElement.ROCK, direction)) {
  6.                     if (mainModel.onTile(MapElement.QUESTION, direction)) {
  7.                         // khi đi lên ô câu hỏi, thực thi xulyGapCauHoi();
  8.                         xulyGapCauHoi();
  9.                     }
  10.                     mainModel.moveBear(direction);             
  11.                 }
  12.             }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement