Jump to content
  • Advertisement

JhomarA.StaCruz

Member
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

108 Neutral

About JhomarA.StaCruz

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. JhomarA.StaCruz

    What algorithm best describe this?

    Question Again: What Algorithm Can I Implement on My Arbiter? Any Suggestion? Thanks!
  2. JhomarA.StaCruz

    [java] Can Java Host at the same time Client Also?

    I cant understand your example, I think you guys misunderstood me... I will try to explain the case more clearer, I have a java program that enables 2 player to play locally (on LAN) without any problems. I just want to add single person only (battle with computer) My problem on my program is it cannot execute if you are not a server or a client.. I want it to connect to itself using the 127.0.0.1 More clearer explanation: Player A wants to play my program only single player, Program A will Connect on Program A. could you give me example using the code above that ive given. Thanks!
  3. JhomarA.StaCruz

    [java] Can Java Host at the same time Client Also?

    Thanks again, but could you give me example of connecting to itself? I tried to connect on 127.0.0.1 but my program closes. This is the main code of my program where it will identify if the program will be the host or the client.. if(blnServerMode) { try { serverObject = new ServerSocket(intSocket); } catch(IOException ioexception) { System.out.println("Could not listen on port: " + intSocket); System.exit(-1); } while(!blnConnected) { System.out.println("Listening for client"); try { socketObject = serverObject.accept(); blnConnected = true; } catch(IOException ioexception1) { System.out.println("Accept failed: " + intSocket); System.exit(-1); } } try { inBuffer = new BufferedReader(new InputStreamReader(socketObject.getInputStream())); outBuffer = new PrintWriter(socketObject.getOutputStream(), true); } catch(IOException ioexception2) { System.out.println("in or out failed"); System.exit(-1); } } else if (!blnServerMode){ System.out.println("Connecting to server"); try { socketObject = new Socket(strServerIP, intSocket); outBuffer = new PrintWriter(socketObject.getOutputStream(), true); inBuffer = new BufferedReader(new InputStreamReader(socketObject.getInputStream())); } catch(UnknownHostException unknownhostexception) { System.out.println("Unknown host"); System.exit(1); } catch(IOException ioexception3) { System.out.println("No I/O"); System.exit(1); } } I dont know how can it connect to itself and accept the connection made by him..
  4. JhomarA.StaCruz

    [java] Can Java Host at the same time Client Also?

    Could you give me example? Thanks!
  5. I just want to ask if it is possible on Java that you could be the host and also the client at the same time? I mean you send strings and it will received by your program also ( not another client ).. I have a program that connects 2 players via Local Area Network, My problem is for 1 player only. I just want AI to produce set of strings that will address on the same client.. Heres my code for connection: The SocketMaster import java.io.*; import java.net.*; import javax.swing.JTextField; public class Socketmaster implements Runnable { InetAddress address; private ServerSocket serverObject; private Socket socketObject; private String strLine; private BufferedReader inBuffer; private PrintWriter outBuffer; private JTextField inTextField; private String strServerIP; private String strInText; private int intSocket; private boolean blnConnected; private boolean blnServerMode; Socketmaster(JTextField jtextfield, int i) { address = null; serverObject = null; socketObject = null; strLine = ""; inBuffer = null; outBuffer = null; strServerIP = ""; strInText = ""; intSocket = 0; blnConnected = false; blnServerMode = true; blnServerMode = true; inTextField = jtextfield; strServerIP = ""; intSocket = i; } Socketmaster(JTextField jtextfield, String s, int i) { address = null; serverObject = null; socketObject = null; strLine = ""; inBuffer = null; outBuffer = null; strServerIP = ""; strInText = ""; intSocket = 0; blnConnected = false; blnServerMode = true; InetAddress inetaddress = null; try { inetaddress = InetAddress.getByName(s); } catch(UnknownHostException unknownhostexception) { System.out.println("Host Name does not exist"); System.exit(1); return; } blnServerMode = false; inTextField = jtextfield; strServerIP = inetaddress.getHostAddress(); intSocket = i; } public void setString(String s) { strInText = s; } public void run() { if(blnServerMode) { try { serverObject = new ServerSocket(intSocket); } catch(IOException ioexception) { System.out.println("Could not listen on port: " + intSocket); System.exit(-1); } while(!blnConnected) { System.out.println("Listening for client"); try { socketObject = serverObject.accept(); blnConnected = true; } catch(IOException ioexception1) { System.out.println("Accept failed: " + intSocket); System.exit(-1); } } try { inBuffer = new BufferedReader(new InputStreamReader(socketObject.getInputStream())); outBuffer = new PrintWriter(socketObject.getOutputStream(), true); } catch(IOException ioexception2) { System.out.println("in or out failed"); System.exit(-1); } } else { System.out.println("Connecting to server"); try { socketObject = new Socket(strServerIP, intSocket); outBuffer = new PrintWriter(socketObject.getOutputStream(), true); inBuffer = new BufferedReader(new InputStreamReader(socketObject.getInputStream())); } catch(UnknownHostException unknownhostexception) { System.out.println("Unknown host"); System.exit(1); } catch(IOException ioexception3) { System.out.println("No I/O"); System.exit(1); } } System.out.println("Connected. Waiting for message..."); do { try { do { while(strLine != null) { strLine = inBuffer.readLine(); System.out.println("Recieving Message: " + strLine); strInText = strLine; inTextField.setText(strLine); inTextField.postActionEvent(); } System.exit(-1); } while(true); } catch(IOException ioexception4) { System.out.println("Read failed"); } System.exit(-1); } while(true); } public boolean GetConnect() { return blnConnected; } public void sendText(String s) { if(inBuffer != null && outBuffer != null) { System.out.println("Sending Message: " + s); outBuffer.println(s); } } public String getText() { return strInText; } } This is where socketmaster is called. if(actionevent.getActionCommand().equals("Host")) { YourTurn = true; AIChecker =false; try { selfIP = ipconfig.ip(); } catch (SocketException ex) { Logger.getLogger(SalpakanMain.class.getName()).log(Level.SEVERE, null, ex); } txtArea.append("\n<System Hosting> Your IP is: " + selfIP.substring(1)); ChatSocket = new Socketmaster(InvisbleField, 4444); Thread thread = new Thread(ChatSocket); thread.start(); MPSocket = new Socketmaster(MPTxtField, 4445); Thread thread2 = new Thread(MPSocket); thread2.start(); Sender = new Language(MPSocket); Host.removeActionListener(this); Host.setEnabled(false); Peer.removeActionListener(this); Peer.setEnabled(false); NewG.setEnabled(true); } if(actionevent.getActionCommand().equals("Peer") && LoneWindow()) { JPanel jpanel = new JPanel(); jpanel.setLayout(null); JLabel jlabel = new JLabel("Host IP:"); ClientButton.setBounds(240, 17, 100, 30); IPfield.setBounds(5, 20, 220, 25); jlabel.setBounds(7, 0, 100, 25); IPfield.addActionListener(this); ClientButton.addActionListener(this); jpanel.add(jlabel); jpanel.add(ClientButton); jpanel.add(IPfield); ConnectWindow.setDefaultCloseOperation(1); ConnectWindow.setContentPane(jpanel); ConnectWindow.setResizable(false); ConnectWindow.pack(); ConnectWindow.setSize(new Dimension(350, 90)); ConnectWindow.setVisible(true); NewG.setEnabled(true); } if(actionevent.getSource() == ClientButton) { YourTurn = false; AIChecker = false; ChatSocket = new Socketmaster(InvisbleField, IPfield.getText(), 4444); Thread thread1 = new Thread(ChatSocket); thread1.start(); MPSocket = new Socketmaster(MPTxtField, IPfield.getText(), 4445); Thread thread3 = new Thread(MPSocket); thread3.start(); Sender = new Language(MPSocket); try { Thread.sleep(2000L); } catch(InterruptedException interruptedexception2) { } Host.removeActionListener(this); Peer.removeActionListener(this); ConnectWindow.setVisible(false); EnablePiece(); ReturnBoard(); Sender.enable(); } Thanks! Hope you could help me.. I dont have much time rewriting the code..
  6. JhomarA.StaCruz

    What algorithm best describe this?

    Oh thanks to all of you.. Im gonna try it.. Sorry for my code, im just starting to learn the JAVA..
  7. JhomarA.StaCruz

    What algorithm best describe this?

    Here is the whole code of my arbiter, its written on Java..Basically it is a two player game by Local Area Network. { ARank = Integer.parseInt(Board[intBoardTempOne][intBoardTempTwo].getText()); System.out.println(ARank); Sender.GrabInfo(intCurrentX, intCurrentY); try { Thread.sleep(50L);//Pause the Program } catch(InterruptedException interruptedexception1) { } YourTurn = false; Sender.setTurn("true"); //When Pieces are the same on rank if(ARank == BRank) { txtArea.append("\n<System> Both Pieces have died coming out of this battle"); ChatSocket.sendText("z<System> Both Pieces have died coming out of this battle"); Board[intBoardTempOne][intBoardTempTwo].setText(""); Board[intCurrentY][intCurrentX].setText(""); removePic(intCurrentY, intCurrentX); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); } else // When Host Private and Client's Spy if(ARank == 1 && BRank == 14) { txtArea.append("\n<System> You have come out victorious, from your battle."); ChatSocket.sendText("z<System> You have been defeated through a horrendous battle."); Board[intCurrentY][intCurrentX].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intCurrentY, intCurrentX, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.sendPos(intCurrentX, intCurrentY); } else // When Host Spy and Client's Private if(ARank == 14 && BRank == 1) { txtArea.append("\n<System> You have been defeated through a horrendous battle"); ChatSocket.sendText("z<System> You have come out victorious, from your battle."); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Board[intCurrentY][intCurrentX].setText("enemy"); setPic(intCurrentY, intCurrentX, "enemy"); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.SendLabel(BRank, intCurrentX, intCurrentY); } else // When Host have higher rank of piece than the Client if(ARank > BRank) { txtArea.append("\n<System> You have come out victorious from your battle."); ChatSocket.sendText("z<System> You have been defeated through a horrendous battle."); Board[intCurrentY][intCurrentX].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intCurrentY, intCurrentX, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.sendPos(intCurrentX, intCurrentY); } else // When Host have lower rank of piece than the Client if(ARank < BRank) { txtArea.append("\n<System> You have been defeated through a horrendous battle"); ChatSocket.sendText("z<System> You have come out victorious, from your battle."); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Board[intCurrentY][intCurrentX].setText("enemy"); setPic(intCurrentY, intCurrentX, "enemy"); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.SendLabel(BRank, intCurrentX, intCurrentY); } // When two flag meets if(ARank == 0 && BRank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempOne); Sender.SendLabel(BRank, intCurrentX, intCurrentY); Sender.sendYouWin(); txtArea.append("\n<System> Tie game!!"); DisableBoard(); Sender.sendTie(); } else if(ARank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempTwo); Sender.sendYouWin(); txtArea.append("\n<System> Good game, try again next time."); txtArea.append("\n<System> Winner will choose to start next game or not."); DisableBoard(); } else if(BRank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempTwo); Sender.SendLabel(BRank, intCurrentX, intCurrentY); txtArea.append("\n<System> Congratulations, you WIN!"); DisableBoard(); Sender.sendYouLose(); ConfirmNewG.setVisible(true); } ConfirmMove.setVisible(false); Moving = false; ReturnBoard();
  8. JhomarA.StaCruz

    What algorithm best describe this?

    The game is this.. http://en.wikipedia.org/wiki/Game_of_the_Generals No, not for school, I just want to make a documentation on instruction how I created the game and algorithm how it works. The arbiter of the game is the referee.. Both players cannot see others pieces.. And if they collide on the same cell the arbiter will look what piece wins.. The arbiter will be the one who will remove, retain or advance the pieces.
  9. I just made a board game, and i dont know what Algorithm best describe this referee or arbiter. The role of arbiter is to check which rank is higher and then remove the lower rank pieces.. I use a lot if IF CONDITIONS to make it work.. Do you know any algorithm that can i put on my papers? Thanks!
  10. JhomarA.StaCruz

    AI Producing Random Moves for this Game

    Thanks for your reply.. Trying to implement it now.. But my prof said that i will just set 3-5modes for the AI? the AI will pick mode randomly in different pieces positions.
  11. JhomarA.StaCruz

    AI Producing Random Moves for this Game

    The hardest part i think is how the "computer opponent" arranges it pieces.. it must occupy 3 by 9 side of the board with dynamic positions..
  12. JhomarA.StaCruz

    AI Producing Random Moves for this Game

    Do you have anything that i could start reading on? Or sample code that produce random moves? Or any algorithm that i can use? Thanks! Alvaro, do you have any Games of the General that contains any computer Opponent?
  13. JhomarA.StaCruz

    AI Producing Random Moves for this Game

    Sorry.. I just need to produce random moves on the opponent side..
  14. I really need help on making AI that produce random moves on this game.. http://en.wikipedia....of_the_Generals I already finished the game but without the AI.. import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.SocketException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.*; import javax.swing.text.Document; public class SalpakanMain implements ActionListener, WindowFocusListener { private JPanel mainPanel; private JPanel ChatBoxPanel; private JPanel PiecesPanel; private JPanel ConfirmPanel; private JPanel NewGPanel; private JPanel AboutPanel; private JPanel editorPanel; private ImageIcon Logo; private static final String newline = "\n"; private String strEnemyX; private String strEnemyY; private String url; private String selfIP; private JScrollPane scroller; private JScrollPane TextScrollPane; private JFrame frame; private JFrame PiecesFrame; private JFrame InstructionFrame; private JFrame ConnectWindow; private JFrame ConfirmMove; private JFrame ConfirmNewG; private JButton ConfirmButton; private JButton YesButton; private JButton NoButton; private JButton NewGameYes; private JButton NewGameNo; private JButton Board[][]; private JButton btnPieces[]; private JButton ClientButton; private int intPieces[]; private JLabel AskMovement; private JLabel AskNewG; private JLabel LogoLabel; private JMenuBar menuBar; private JMenu menu, submenu; private JMenuItem Host; private JMenuItem AImode; private JMenuItem Peer; private JMenuItem Help; private JMenuItem exit; private JMenuItem NewG; private JMenuItem Units; private JMenuItem Pieces; private JMenuItem Instructions; private JMenuItem About; private boolean PiecesLaidDown; private boolean Selected; private boolean MovePiece; private boolean Confirm; private boolean YourTurn; private boolean Moving; private boolean WaitingConfirm; private boolean Proceed; private int intBoardCountOne; private int intBoardCountTwo; private int PieceSelected; private int intBoardTempOne; private int intBoardTempTwo; private int PieceCount; private int intCurrentX; private int intCurrentY; private int intEnemyX; private int intEnemyY; private int BRank; private int ARank; private Socketmaster ChatSocket; private Socketmaster MPSocket; private Language Sender; private JTextField IPfield; private JTextField MPTxtField; private JTextField Display; private JTextField IPBox; private JTextField InvisbleField; private JTextArea txtArea; private JTextArea InstructionArea; public SalpakanMain() { Logo = new ImageIcon("About.gif"); strEnemyX = ""; strEnemyY = ""; selfIP = ""; AboutPanel = new JPanel(); editorPanel = new JPanel(); scroller = new JScrollPane(); frame = new JFrame("Salpakan (Games of the Generals)"); PiecesFrame = new JFrame("Piece Selection"); InstructionFrame = new JFrame("InstructionFrame"); ConnectWindow = new JFrame("Connection"); ConfirmMove = new JFrame("Confirm Movement"); ConfirmNewG = new JFrame("New Game?"); Board = new JButton[8][9]; btnPieces = new JButton[15]; ClientButton = new JButton("Connect"); intPieces = new int[15]; LogoLabel = new JLabel(Logo); menuBar = new JMenuBar(); PiecesLaidDown = false; Selected = false; MovePiece = false; Confirm = false; YourTurn = false; Moving = false; WaitingConfirm = false; Proceed = false; PieceSelected = 0; intBoardTempOne = 0; intBoardTempTwo = 0; PieceCount = 0; intCurrentX = 0; intCurrentY = 0; ChatSocket = null; MPSocket = null; Sender = null; IPfield = new JTextField("IP Address of the Server"); mainPanel = new JPanel(); ChatBoxPanel = new JPanel(); PiecesPanel = new JPanel(); ChatBoxPanel.setLayout(new BorderLayout()); mainPanel.setLayout(null); PiecesPanel.setLayout(null); ConfirmPanel = new JPanel(); ConfirmPanel.setLayout(null); NewGPanel = new JPanel(); NewGPanel.setLayout(null); AboutPanel.setLayout(new BorderLayout()); editorPanel.setLayout(new BorderLayout()); JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); frame.setDefaultCloseOperation(3); frame.setResizable(false); PiecesFrame.setDefaultCloseOperation(1); PiecesFrame.setLocation(650, 60); PiecesFrame.setResizable(false); InstructionFrame.setLocation(190, 50); InstructionFrame.setResizable(false); InstructionFrame.addWindowFocusListener(this); InstructionFrame.setDefaultCloseOperation(1); ConfirmMove.setDefaultCloseOperation(0); ConfirmMove.setLocation(190, 200); ConfirmMove.setResizable(false); ConfirmMove.addWindowFocusListener(this); YesButton = new JButton("Yes"); NoButton = new JButton("No"); AskMovement = new JLabel("Are you sure you want to move there?"); YesButton.addActionListener(this); NoButton.addActionListener(this); YesButton.setBounds(30, 70, 100, 25); NoButton.setBounds(160, 70, 100, 25); AskMovement.setBounds(40, 20, 250, 25); ConfirmPanel.add(AskMovement); ConfirmPanel.add(NoButton); ConfirmPanel.add(YesButton); ConfirmNewG.setDefaultCloseOperation(0); ConfirmNewG.setLocation(190, 200); ConfirmNewG.setResizable(false); ConfirmNewG.addWindowFocusListener(this); NewGameYes = new JButton("Yes"); NewGameNo = new JButton("No"); AskNewG = new JLabel("Are you sure you want to start a new game?"); NewGameYes.addActionListener(this); NewGameNo.addActionListener(this); NewGameYes.setBounds(30, 70, 100, 25); NewGameNo.setBounds(160, 70, 100, 25); AskNewG.setBounds(40, 20, 250, 25); NewGPanel.add(AskNewG); NewGPanel.add(NewGameNo); NewGPanel.add(NewGameYes); ConnectWindow.addWindowFocusListener(this); txtArea = new JTextArea(6, 40); txtArea.setMargin(new Insets(0, 0, 0, 0)); txtArea.setEditable(false); txtArea.setText(" Welcome to Salpakan (Games of the General) \n Developed by: Jhomar A. Sta. Cruz & Dan Christopher E. Sy \n Enjoy Playing! \n"); TextScrollPane = new JScrollPane(txtArea); ChatBoxPanel.add(TextScrollPane, "North"); InstructionArea = new JTextArea(6, 40); InstructionArea.setMargin(new Insets(0, 0, 0, 0)); InstructionArea.setEditable(false); AboutPanel.add(editorPanel, "Center"); editorPanel.add(scroller, "Center"); scroller.getViewport().add(InstructionArea); Display = new JTextField(); Display.setEditable(true); Display.addActionListener(this); ChatBoxPanel.add(Display); InvisbleField = new JTextField(); InvisbleField.addActionListener(this); MPTxtField = new JTextField(""); MPTxtField.addActionListener(this); Board = new JButton[8][9]; //Draw the board of the GotG for(int i = 0; i <= 7; i++) { for(int i1 = 0; i1 <= 8; i1++) { Board[i1] = new JButton(""); Board[i1].setBackground(Color.lightGray); Board[i1].addActionListener(this); mainPanel.add(Board[i1]); } } for(int j = 0; j <= 7; j++) { for(int j1 = 0; j1 <= 8; j1++) { Board[j][j1].setBounds(j1 * 56 + 72, j * 52 + 10, 56, 52); } } //Put Images on PiecesPanel on the Left Side ConfirmButton = new JButton("Start!"); ConfirmButton.addActionListener(this); ConfirmButton.setEnabled(false); PiecesPanel.add(ConfirmButton); //Size of the Panel ConfirmButton.setBounds(75, 210, 100, 25); //For loop starts here to draw the Pieces // k = 14 because GotG has 14 Differnt Pieces for(int k = 0; k <= 14; k++) { // K == 12 because players have 6 Privates. if(k == 12) { intPieces[k] = 6; } else // K == 13 because players have 2 Spy. if(k == 13) { intPieces[k] = 2; } else // All other ranks will contain only 1 piece. { intPieces[k] = 1; } // Importing the Image of the Pieces. // Check if this is not a Private or Spy. //If condition is met it will import images for other ranks that only contain 1 piece. if(k != 13 && k != 14) { url = "Images/"+ (14 - (k + 1)) + ".gif"; btnPieces[k] = new JButton("" + (14 - (k + 1))); } else // If this is spy import this image if(k == 13) { url = "Images/14.gif"; btnPieces[k] = new JButton("14"); } else // If this is flag import this image. if(k == 14) { url = "Images/0.gif"; btnPieces[k] = new JButton("0"); } setPiecePic(k, url); btnPieces[k].addActionListener(this); btnPieces[k].setBorderPainted(false); //Add the btnPieces to the Pieces Panel PiecesPanel.add(btnPieces[k]); } int k1 = 0; int l1 = 0; for(int l = 0; l <= 14; l++) { btnPieces[l].setBounds(l1 * 56 + 10, k1 * 52, 56, 52); if(++l1 == 4) { l1 = 0; k1++; } } menu = new JMenu("Mode"); menu.setMnemonic(89); menuBar.add(menu); submenu = new JMenu("Two Players"); submenu.setMnemonic(91); menu.add(submenu); Host = new JMenuItem("Start Server", 83); Host.setAccelerator(KeyStroke.getKeyStroke(83, 2)); Host.addActionListener(this); Host.setActionCommand("Host"); submenu.add(Host); AImode = new JMenuItem("One Player", 90); AImode.setAccelerator(KeyStroke.getKeyStroke(90, 2)); AImode.addActionListener(this); AImode.setActionCommand("One Player"); menu.add(AImode); Peer = new JMenuItem("Connect to Server", 67); Peer.setAccelerator(KeyStroke.getKeyStroke(67, 2)); Peer.addActionListener(this); Peer.setActionCommand("Peer"); submenu.add(Peer); menu = new JMenu("Game"); menu.setMnemonic(71); menuBar.add(menu); NewG = new JMenuItem("New Game", 78); NewG.setAccelerator(KeyStroke.getKeyStroke(78, 2)); NewG.addActionListener(this); NewG.setActionCommand("New Game"); NewG.setEnabled(false); menu.add(NewG); menu = new JMenu("View"); menu.setMnemonic(86); menuBar.add(menu); Pieces = new JMenuItem("Piece Selection", 80); Pieces.setAccelerator(KeyStroke.getKeyStroke(80, 2)); Pieces.addActionListener(this); Pieces.setActionCommand("Piece"); menu.add(Pieces); menu = new JMenu("Help"); menu.setMnemonic(72); menuBar.add(menu); Instructions = new JMenuItem("Instructions", 73); Instructions.setAccelerator(KeyStroke.getKeyStroke(73, 2)); Instructions.addActionListener(this); Instructions.setActionCommand("Instructions"); menu.add(Instructions); menu.addSeparator(); About = new JMenuItem("About Us", 65); About.setAccelerator(KeyStroke.getKeyStroke(65, 2)); About.addActionListener(this); About.setActionCommand("About"); menu.add(About); frame.setJMenuBar(menuBar); frame.getContentPane().add("South", ChatBoxPanel); PiecesPanel.setBounds(620, 0, 250 ,280); frame.add(PiecesPanel); frame.getContentPane().add(mainPanel); //PiecesFrame.setContentPane(PiecesPanel); ConfirmMove.setContentPane(ConfirmPanel); ConfirmNewG.setContentPane(NewGPanel); InstructionFrame.setContentPane(AboutPanel); InstructionFrame.setContentPane(editorPanel); frame.pack(); ConfirmMove.pack(); ConfirmNewG.pack(); PiecesFrame.pack(); InstructionFrame.pack(); frame.setSize(900, 600); PiecesFrame.setSize(250, 280); ConfirmMove.setSize(300, 150); ConfirmNewG.setSize(300, 150); InstructionFrame.setSize(600, 400); frame.setVisible(true); //PiecesFrame.setVisible(true); ConfirmMove.setVisible(false); ConfirmNewG.setVisible(false); InstructionFrame.setVisible(false); frame.requestFocus(); DisableBoard(); DisablePiece(); } public void actionPerformed(ActionEvent actionevent) { if(actionevent.getActionCommand().equals("Host")) { YourTurn = true; try { selfIP = ipconfig.ip(); } catch (SocketException ex) { Logger.getLogger(SalpakanMain.class.getName()).log(Level.SEVERE, null, ex); } txtArea.append("\n<System Hosting> Your IP is: " + selfIP.substring(1)); ChatSocket = new Socketmaster(InvisbleField, 4444); Thread thread = new Thread(ChatSocket); thread.start(); MPSocket = new Socketmaster(MPTxtField, 4445); Thread thread2 = new Thread(MPSocket); thread2.start(); Sender = new Language(MPSocket); Host.removeActionListener(this); Host.setEnabled(false); Peer.removeActionListener(this); Peer.setEnabled(false); NewG.setEnabled(true); } if(actionevent.getActionCommand().equals("Peer") && LoneWindow()) { JPanel jpanel = new JPanel(); jpanel.setLayout(null); JLabel jlabel = new JLabel("Host IP or DNS:"); ClientButton.setBounds(240, 17, 100, 30); IPfield.setBounds(5, 20, 220, 25); jlabel.setBounds(7, 0, 100, 25); IPfield.addActionListener(this); ClientButton.addActionListener(this); jpanel.add(jlabel); jpanel.add(ClientButton); jpanel.add(IPfield); ConnectWindow.setDefaultCloseOperation(1); ConnectWindow.setContentPane(jpanel); ConnectWindow.setResizable(false); ConnectWindow.pack(); ConnectWindow.setSize(new Dimension(350, 90)); ConnectWindow.setVisible(true); NewG.setEnabled(true); } if(actionevent.getSource() == ClientButton) { YourTurn = false; ChatSocket = new Socketmaster(InvisbleField, IPfield.getText(), 4444); Thread thread1 = new Thread(ChatSocket); thread1.start(); MPSocket = new Socketmaster(MPTxtField, IPfield.getText(), 4445); Thread thread3 = new Thread(MPSocket); thread3.start(); Sender = new Language(MPSocket); try { Thread.sleep(2000L); } catch(InterruptedException interruptedexception2) { } Host.removeActionListener(this); Peer.removeActionListener(this); ConnectWindow.setVisible(false); EnablePiece(); ReturnBoard(); Sender.enable(); } if(actionevent.getActionCommand().equals("Instructions") && LoneWindow()) { InstructionFrame.setTitle("Instructions"); editorPanel.add(scroller); editorPanel.remove(LogoLabel); InstructionFrame.setVisible(true); scroller.setHorizontalScrollBarPolicy(30); scroller.setVerticalScrollBarPolicy(20); try { InstructionArea.read(new FileReader("Instruction.Gotg"), null); } catch(IOException ioexception) { } } if(actionevent.getActionCommand().equals("One Player") && LoneWindow()) { newgamemethod(); } if(actionevent.getActionCommand().equals("About") && LoneWindow()) { InstructionFrame.setTitle("About Us"); InstructionFrame.setVisible(true); editorPanel.remove(scroller); editorPanel.add(LogoLabel); InstructionFrame.pack(); } if(actionevent.getActionCommand().equals("Piece")) { if(PiecesFrame.isVisible()) { PiecesFrame.setVisible(false); } else { PiecesFrame.setVisible(true); } frame.requestFocus(); } if(actionevent.getSource() == Display) { if(ChatSocket != null) { try { Thread.sleep(40L); } catch(InterruptedException interruptedexception) { } ChatSocket.sendText(Display.getText()); } txtArea.append("\n<Self> " + Display.getText()); txtArea.setCaretPosition(txtArea.getDocument().getLength()); Display.setText(""); } if(actionevent.getSource() == InvisbleField) { if(InvisbleField.getText().charAt(0) != 'z') { txtArea.append("\n<Peer> " + InvisbleField.getText()); } else { txtArea.append("\n" + InvisbleField.getText().substring(1)); } txtArea.setCaretPosition(txtArea.getDocument().getLength()); } if(!Confirm && !WaitingConfirm) { for(int i = 0; i <= 14; i++) { if(actionevent.getSource() != btnPieces || Selected) { continue; } Selected = true; for(intBoardCountOne = 0; intBoardCountOne <= 4; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { Board[intBoardCountOne][intBoardCountTwo].setEnabled(false); } } intPieces--; if(intPieces == 0) { btnPieces.setEnabled(false); } PieceSelected = i; PieceCount++; } for(intBoardCountOne = 4; intBoardCountOne <= 7; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { if(actionevent.getSource() == Board[intBoardCountOne][intBoardCountTwo] && Selected && !MovePiece) { if(Board[intBoardCountOne][intBoardCountTwo].getText() != "") { continue; } Board[intBoardCountOne][intBoardCountTwo].setText(btnPieces[PieceSelected].getText()); setPic(intBoardCountOne, intBoardCountTwo, btnPieces[PieceSelected].getText()); Selected = false; Sender.sendPos(intBoardCountTwo, intBoardCountOne); if(PieceCount == 21) { ConfirmButton.setEnabled(true); } continue; } if(actionevent.getSource() == Board[intBoardCountOne][intBoardCountTwo] && !Selected) { if(Board[intBoardCountOne][intBoardCountTwo].getText() != "") { Selected = true; MovePiece = true; intBoardTempOne = intBoardCountOne; intBoardTempTwo = intBoardCountTwo; } continue; } if(actionevent.getSource() == Board[intBoardCountOne][intBoardCountTwo] && MovePiece && Board[intBoardCountOne][intBoardCountTwo].getText() == "") { Board[intBoardCountOne][intBoardCountTwo].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intBoardCountOne, intBoardCountTwo, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.sendPos(intBoardCountTwo, intBoardCountOne); MovePiece = false; Selected = false; } } } } else if(Confirm && WaitingConfirm && YourTurn) { for(intBoardCountOne = 0; intBoardCountOne <= 7; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { if(actionevent.getSource() == Board[intBoardCountOne][intBoardCountTwo] && !Moving && Board[intBoardCountOne][intBoardCountTwo].getText() != "" && Board[intBoardCountOne][intBoardCountTwo].getText() != "enemy") { intBoardTempOne = intBoardCountOne; intBoardTempTwo = intBoardCountTwo; intCurrentX = intBoardCountTwo; intCurrentY = intBoardCountOne; ShowMoves(intBoardCountOne, intBoardCountTwo); Moving = true; continue; } if(actionevent.getSource() != Board[intBoardCountOne][intBoardCountTwo] || !Moving) { continue; } if(intBoardCountOne == intBoardTempOne && intBoardCountTwo == intBoardTempTwo) { Moving = false; ReturnBoard(); continue; } if((Board[intBoardCountOne][intBoardCountTwo].getText() == "" || Board[intBoardCountOne][intBoardCountTwo].getText().equalsIgnoreCase("enemy")) && LoneWindow()) { intCurrentX = intBoardCountTwo; intCurrentY = intBoardCountOne; ConfirmMove.setVisible(true); } } } } if(actionevent.getSource() == YesButton && Board[intCurrentY][intCurrentX].getText().equalsIgnoreCase("enemy")) { ARank = Integer.parseInt(Board[intBoardTempOne][intBoardTempTwo].getText()); System.out.println(ARank); Sender.GrabInfo(intCurrentX, intCurrentY); try { Thread.sleep(50L); } catch(InterruptedException interruptedexception1) { } YourTurn = false; Sender.setTurn("true"); if(ARank == BRank) { txtArea.append("\n<System> Both Pieces have died coming out of this battle"); ChatSocket.sendText("z<System> Both Pieces have died coming out of this battle"); Board[intBoardTempOne][intBoardTempTwo].setText(""); Board[intCurrentY][intCurrentX].setText(""); removePic(intCurrentY, intCurrentX); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); } else if(ARank == 1 && BRank == 14) { txtArea.append("\n<System> You have come out victorious, from your battle."); ChatSocket.sendText("z<System> You have been defeated through a horrendous battle."); Board[intCurrentY][intCurrentX].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intCurrentY, intCurrentX, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.sendPos(intCurrentX, intCurrentY); } else if(ARank == 14 && BRank == 1) { txtArea.append("\n<System> You have been defeated through a horrendous battle"); ChatSocket.sendText("z<System> You have come out victorious, from your battle."); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Board[intCurrentY][intCurrentX].setText("enemy"); setPic(intCurrentY, intCurrentX, "enemy"); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.SendLabel(BRank, intCurrentX, intCurrentY); } else if(ARank > BRank) { txtArea.append("\n<System> You have come out victorious from your battle."); ChatSocket.sendText("z<System> You have been defeated through a horrendous battle."); Board[intCurrentY][intCurrentX].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intCurrentY, intCurrentX, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.sendPos(intCurrentX, intCurrentY); } else if(ARank < BRank) { txtArea.append("\n<System> You have been defeated through a horrendous battle"); ChatSocket.sendText("z<System> You have come out victorious, from your battle."); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); Board[intCurrentY][intCurrentX].setText("enemy"); setPic(intCurrentY, intCurrentX, "enemy"); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Sender.EraseEnemy(intCurrentX, intCurrentY); Sender.SendLabel(BRank, intCurrentX, intCurrentY); } if(ARank == 0 && BRank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempOne); Sender.SendLabel(BRank, intCurrentX, intCurrentY); Sender.sendYouWin(); txtArea.append("\n<System> Tie game!!"); DisableBoard(); Sender.sendTie(); } else if(ARank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempTwo); Sender.sendYouWin(); txtArea.append("\n<System> Good game, try again next time."); txtArea.append("\n<System> Winner will choose to start next game or not."); DisableBoard(); } else if(BRank == 0) { setPic(intCurrentY, intCurrentX, "" + BRank); setPic(intBoardTempTwo, intBoardTempTwo, "" + ARank); Sender.SendLabel(ARank, intBoardTempTwo, intBoardTempTwo); Sender.SendLabel(BRank, intCurrentX, intCurrentY); txtArea.append("\n<System> Congratulations, you WIN!"); DisableBoard(); Sender.sendYouLose(); ConfirmNewG.setVisible(true); } ConfirmMove.setVisible(false); Moving = false; ReturnBoard(); } else if(actionevent.getSource() == YesButton && !Board[intCurrentY][intCurrentX].getText().equalsIgnoreCase("enemy")) { ARank = Integer.parseInt(Board[intBoardTempOne][intBoardTempTwo].getText()); if(ARank == 0 && intCurrentY == 0) { txtArea.append("\n<System> Congratulations, you WIN!"); DisableBoard(); Sender.sendYouLose(); ConfirmNewG.setVisible(true); } YourTurn = false; Sender.setTurn("true"); Board[intCurrentY][intCurrentX].setText(Board[intBoardTempOne][intBoardTempTwo].getText()); setPic(intCurrentY, intCurrentX, Board[intBoardTempOne][intBoardTempTwo].getText()); Board[intBoardTempOne][intBoardTempTwo].setText(""); removePic(intBoardTempOne, intBoardTempTwo); ConfirmMove.setVisible(false); Sender.sendPos(intCurrentX, intCurrentY); Sender.EraseEnemy(intBoardTempTwo, intBoardTempOne); Moving = false; ReturnBoard(); } else if(actionevent.getSource() == NoButton) { Moving = false; ReturnBoard(); ConfirmMove.setVisible(false); } if(actionevent.getSource() == ConfirmButton && !WaitingConfirm) { WaitingConfirm = true; Sender.sendBoolean(); ReturnBoard(); for(int j = 0; j <= 14; j++) { if(j == 12) { intPieces[j] = 6; } else if(j == 13) { intPieces[j] = 2; } else { intPieces[j] = 1; } btnPieces[j].setText("" + intPieces[j]); btnPieces[j].setEnabled(true); btnPieces[j].removeActionListener(this); } ConfirmButton.setEnabled(false); if(!MPTxtField.getText().equalsIgnoreCase("true")) { txtArea.append("\n<System> Waiting for other user to confirm...."); } } if(MPTxtField.getText().equalsIgnoreCase("true") && WaitingConfirm) { Confirm = true; txtArea.append("\n<System> Opponent has confirmed, game starting."); MPTxtField.setText(" "); } if(actionevent.getSource() == MPTxtField && MPTxtField.getText() != "" && MPTxtField != null) { if(MPTxtField.getText().equalsIgnoreCase("START")) { EnablePiece(); ReturnBoard(); } if(MPTxtField.getText().equalsIgnoreCase("YOUWIN")) { txtArea.append("\n<System> Congratulations, you WIN!"); DisableBoard(); ConfirmNewG.setVisible(true); } else if(MPTxtField.getText().equalsIgnoreCase("YOULOSE")) { txtArea.append("\n<System> Good game, try again next time."); txtArea.append("\n<System> Winner will choose to start next game or not."); DisableBoard(); } else if(MPTxtField.getText().equalsIgnoreCase("TIE")) { txtArea.append("\n<System> Tie game!!"); txtArea.append("\n<System> Host will choose to start next game or not."); DisableBoard(); } if(MPTxtField.getText().equalsIgnoreCase("NEWGAME")) { txtArea.append("\n<System> Game Ended."); txtArea.append("\n<System> Opponent requested New Game."); txtArea.append("\n<System> Waiting for Confirm..."); newgamemethod(); } if(MPTxtField.getText().charAt(0) == 'p') { MakeIntegers(1, 2); Board[7 - intEnemyY][8 - intEnemyX].setText("enemy"); setPic(7 - intEnemyY, 8 - intEnemyX, "enemy"); } if(MPTxtField.getText().charAt(0) == 'x') { if(MPTxtField.getText().substring(1).equals("true")) { YourTurn = true; txtArea.append("\n<System> It Is Your Turn To Move"); txtArea.setCaretPosition(txtArea.getDocument().getLength()); } else { YourTurn = false; } } else if(MPTxtField.getText().charAt(0) == 'e') { MakeIntegers(1, 2); Board[7 - intEnemyY][8 - intEnemyX].setText(""); removePic(7 - intEnemyY, 8 - intEnemyX); } else if(MPTxtField.getText().charAt(0) == 'y') { BRank = Integer.parseInt(MPTxtField.getText().substring(1)); } else if(MPTxtField.getText().charAt(0) == 'b') { MakeIntegers(1, 2); Sender.sendPiece(Board[7 - intEnemyY][8 - intEnemyX].getText()); } else if(MPTxtField.getText().charAt(0) == 'l') { if(MPTxtField.getText().length() > 4) { MakeIntegers(3, 4); Board[7 - intEnemyY][8 - intEnemyX].setText(MPTxtField.getText().substring(1, 3)); setPic(7 - intEnemyY, 8 - intEnemyX, MPTxtField.getText().substring(1, 3)); } else { MakeIntegers(2, 3); Board[7 - intEnemyY][8 - intEnemyX].setText(MPTxtField.getText().substring(1, 2)); setPic(7 - intEnemyY, 8 - intEnemyX, MPTxtField.getText().substring(1, 2)); } } } if(actionevent.getSource() == NewGameYes) { txtArea.append("\n<System> New Game Started!"); Sender.NewGameRequest(); newgamemethod(); Sender.setTurn("false"); YourTurn = true; ConfirmNewG.setVisible(false); } else if(actionevent.getSource() == NewGameNo) { ConfirmNewG.setVisible(false); } if(actionevent.getActionCommand().equals("New Game")) { ConfirmNewG.setVisible(true); } } public void windowGainedFocus(WindowEvent windowevent) { } public void windowLostFocus(WindowEvent windowevent) { if(windowevent.getSource() == ConfirmMove) { ConfirmMove.requestFocus(); } if(windowevent.getSource() == ConnectWindow) { ConnectWindow.requestFocus(); } if(windowevent.getSource() == ConfirmNewG) { ConfirmNewG.requestFocus(); } if(windowevent.getSource() == InstructionFrame) { InstructionFrame.requestFocus(); } } private boolean LoneWindow() { return !ConfirmMove.isVisible() && !ConnectWindow.isVisible() && !ConfirmNewG.isVisible() && !InstructionFrame.isVisible(); } public void newgamemethod() { PiecesLaidDown = false; Selected = false; MovePiece = false; Confirm = false; YourTurn = false; Moving = false; WaitingConfirm = false; clearBoard(); PieceCount = 0; for(int i = 0; i <= 14; i++) { if(i == 12) { intPieces = 6; } else if(i == 13) { intPieces = 2; } else { intPieces = 1; } if(i != 13 && i != 14) { btnPieces.setText("" + (14 - (i + 1))); } else if(i == 13) { btnPieces.setText("14"); } else if(i == 14) { btnPieces.setText("0"); } btnPieces.addActionListener(this); btnPieces.setBorderPainted(false); } EnablePiece(); ReturnBoard(); } private void MakeIntegers(int i, int j) { strEnemyX = MPTxtField.getText().substring(i, i + 1); strEnemyY = MPTxtField.getText().substring(j); intEnemyX = Integer.parseInt(strEnemyX); intEnemyY = Integer.parseInt(strEnemyY); } private void ShowMoves(int i, int j) { DisableBoard(); for(int k = -1; k <= 1; k++) { if(i + k >= 0 && i + k <= 7 && (Board[i + k][j].getText() == "" || Board[i + k][j].getText() == "enemy")) { Board[i + k][j].setEnabled(true); } if(j + k >= 0 && j + k <= 8 && (Board[j + k].getText() == "" || Board[j + k].getText() == "enemy")) { Board[j + k].setEnabled(true); } if(k == 0) { Board[j].setEnabled(true); } } } private void EnablePiece() { for(int i = 0; i < 15; i++) { btnPieces.setEnabled(true); } } private void DisablePiece() { for(int i = 0; i < 15; i++) { btnPieces.setEnabled(false); } } private void ReturnBoard() { for(intBoardCountOne = 0; intBoardCountOne <= 7; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { Board[intBoardCountOne][intBoardCountTwo].setEnabled(true); } } } private void DisableBoard() { for(intBoardCountOne = 0; intBoardCountOne <= 7; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { Board[intBoardCountOne][intBoardCountTwo].setEnabled(false); } } } private void clearBoard() { for(intBoardCountOne = 0; intBoardCountOne <= 7; intBoardCountOne++) { for(intBoardCountTwo = 0; intBoardCountTwo <= 8; intBoardCountTwo++) { Board[intBoardCountOne][intBoardCountTwo].setText(""); removePic(intBoardCountOne, intBoardCountTwo); } } } public int getPieceID() { return Integer.parseInt(Board[intCurrentY][intCurrentX].getText()); } public void setPic(int i, int j, String s) { if(s != "enemy") { url ="Images/" + s + ".gif"; } else { url ="Images/enemy.gif"; } Board[j].setForeground(Color.white); Board[j].setVerticalTextPosition(1); Board[j].setIconTextGap(-8); Board[j].setHorizontalTextPosition(4); Board[j].setIconTextGap(-10); Board[j].setIcon(new ImageIcon(url)); Board[j].setHorizontalAlignment(0); } public void setPiecePic(int i, String s) { btnPieces.setForeground(Color.white); btnPieces.setVerticalTextPosition(1); btnPieces.setIconTextGap(-8); btnPieces.setHorizontalTextPosition(4); btnPieces.setIconTextGap(-10); btnPieces.setIcon(new ImageIcon(s)); btnPieces.setHorizontalAlignment(0); } public void removePic(int i, int j) { Board[j].setForeground(Color.white); Board[j].setVerticalTextPosition(1); Board[j].setIconTextGap(-8); Board[j].setHorizontalTextPosition(4); Board[j].setIconTextGap(-10); Board[j].setIcon(null); Board[j].setHorizontalAlignment(0); } public static void main(String args[]) { SwingUtilities.invokeLater(new Runnable() { public void run() { SalpakanMain gotg = new SalpakanMain(); } }); } } This part of the 1 player is missing, i dont know what to put to generate random moves and random position of the pieces. if(actionevent.getActionCommand().equals("One Player") && LoneWindow()) { newgamemethod(); } Please help me.. I really need this project to be done.. Thank you and Godbless.
  15. JhomarA.StaCruz

    Game of The Generals AI

    Thank you willh. Im having a hard time writing my AI for this Game.. Do you have any guides where i could start? And what is the best AI to implement this game?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!