|
@ -1,3 +1,4 @@ |
|
|
|
|
|
import BattleShip.BShip; |
|
|
import PingPong.GamePanel; |
|
|
import PingPong.GamePanel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -36,13 +37,16 @@ public class MenuPanel extends JPanel { |
|
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
public void keyPressed(KeyEvent e) { |
|
|
if (e.getKeyCode() == KeyEvent.VK_1) { |
|
|
if (e.getKeyCode() == KeyEvent.VK_1) { |
|
|
new GameFrame(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new PingPong.GamePanel(); |
|
|
} |
|
|
} |
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_2) { |
|
|
|
|
|
BShip game = new BShip(); |
|
|
|
|
|
game.startGame(); |
|
|
|
|
|
} |
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_3) { |
|
|
|
|
|
new Snake.Game(); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private class GameFrame { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |