package ww10;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import ww10.WW10Protocol.PrologBotDescription;
public class DummyClient {
public static void main(String[] args) {
try {
Socket socket = new Socket("localhost", 20000);
String n = "\n";
PrologBotDescription msg = WW10Protocol.PrologBotDescription.newBuilder().setId(0).setName("Tias")
.setProlog("do(call,1) :- ispreflop, !." + n + "do(call,2) :- isflop, !." + n + "do(call,3) :- ispostflop, !." + n).build();
OutputStream outputStream = socket.getOutputStream();
InputStream inputStream = socket.getInputStream();
msg.writeTo(outputStream);
outputStream.close();
inputStream.close();
socket.close();
} catch (IOException e) {
e.printStackTrace();
System.exit(-1);
}
}
}