daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Jan 24th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package battaglianavale_def;
  7.  
  8.  
  9. import java.io.IOException;
  10. import java.net.InetAddress;
  11. import java.net.Socket;
  12. import java.util.Scanner;
  13.  
  14. /**
  15.  *
  16.  * @author feltredenis
  17.  */
  18. public class client {
  19.     private Socket server;
  20.     //private BufferedReader messaggioIn;
  21.    // private DataOutputStream messaggioOut;
  22.    
  23.     public client()
  24.     {
  25.         server = null;
  26.     }
  27.    
  28.     public client(InetAddress ipServer, int portServer)
  29.     {
  30.         try {
  31.             server = new Socket(ipServer,portServer);
  32.           //  messaggioIn = new BufferedReader(new InputStreamReader(server.getInputStream()));
  33.             //messaggioOut = new DataOutputStream(server.getOutputStream());
  34.         } catch (IOException ex) {
  35.          
  36.             System.out.println(ex.getMessage());
  37.         }
  38.     }
  39.    
  40.      public static void attacco(){
  41.                
  42.             Scanner input1=new Scanner(System.in);
  43.             Scanner input2=new Scanner(System.in);
  44.             System.out.println("Riga da colpire:");
  45.             int colpo1 = input1.nextInt();
  46.             System.out.println("colonna da colpire:");
  47.             int colpo2= input2.nextInt();
  48.             input1.nextInt(colpo1);
  49.             input2.nextInt(colpo2);          
  50.            
  51.            
  52.                
  53.             }
  54.      
  55. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top