Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package battaglianavale_def;
- import java.io.IOException;
- import java.net.InetAddress;
- import java.net.Socket;
- import java.util.Scanner;
- /**
- *
- * @author feltredenis
- */
- public class client {
- private Socket server;
- //private BufferedReader messaggioIn;
- // private DataOutputStream messaggioOut;
- public client()
- {
- server = null;
- }
- public client(InetAddress ipServer, int portServer)
- {
- try {
- server = new Socket(ipServer,portServer);
- // messaggioIn = new BufferedReader(new InputStreamReader(server.getInputStream()));
- //messaggioOut = new DataOutputStream(server.getOutputStream());
- } catch (IOException ex) {
- System.out.println(ex.getMessage());
- }
- }
- public static void attacco(){
- Scanner input1=new Scanner(System.in);
- Scanner input2=new Scanner(System.in);
- System.out.println("Riga da colpire:");
- int colpo1 = input1.nextInt();
- System.out.println("colonna da colpire:");
- int colpo2= input2.nextInt();
- input1.nextInt(colpo1);
- input2.nextInt(colpo2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement