use of dogecade.games.rps.RockPaperScissors in project dogecade by ebanisadr.
the class RPSTester method main.
public static void main(String... args) {
List<Player> p = new ArrayList<>();
p.add(new Player(Dogecade.server.getUsername(), BigDecimal.valueOf(100)));
p.add(new Player("name2", BigDecimal.valueOf(33)));
RockPaperScissors rps = new RockPaperScissors(p, new TestingRPSServerImpl(), 3);
rps.startGame();
}
use of dogecade.games.rps.RockPaperScissors in project dogecade by ebanisadr.
the class MainMenu method createUIComponents.
private void createUIComponents() {
myAccountButton = new JButton("My MyProfileScreen");
myAccountButton.addActionListener(e -> MyAccountScreen.showMyAccountWindow());
chatTextArea = new JChatBox();
sendButton = new JButton("send");
sendButton.addActionListener(e -> ((JChatBox) chatTextArea).getMessageFromEnterBox());
enterTextField = new JTextField();
enterTextField.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
}
@Override
public void keyReleased(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
((JChatBox) chatTextArea).getMessageFromEnterBox();
}
}
});
roomsPanel = new JPanel();
JButton startRPSButton = new JButton("play rps against the computer");
startRPSButton.addActionListener(e -> {
List<Player> p = new ArrayList<>();
p.add(new Player(Dogecade.server.getUsername(), BigDecimal.valueOf(100)));
p.add(new Player("name2", BigDecimal.valueOf(33)));
new RockPaperScissors(p, Dogecade.rpsServer, 3).startGame();
});
roomsPanel.add(startRPSButton);
}
Aggregations