penis
This commit is contained in:
parent
c117b13ddc
commit
918b742029
14 changed files with 16 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ public class Main extends JFrame {
|
||||||
|
|
||||||
// AI Configuration
|
// AI Configuration
|
||||||
private static final String API_KEY = "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";
|
private static final String API_KEY = "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";
|
||||||
private static final String MODEL = "arcee-ai/trinity-large-preview:free";
|
private static final String MODEL = "qwen/qwen3-4b:free";
|
||||||
private char[] boardState = new char[9]; // Keep track of board state
|
private char[] boardState = new char[9]; // Keep track of board state
|
||||||
|
|
||||||
private void connectToServer() {
|
private void connectToServer() {
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Tue Feb 10 14:20:59 CET 2026
|
#Tue Feb 10 14:46:43 CET 2026
|
||||||
artifactId=ai-client
|
artifactId=ai-client
|
||||||
groupId=com.lona.tictactoe
|
groupId=com.lona.tictactoe
|
||||||
version=1.0-SNAPSHOT
|
version=1.0-SNAPSHOT
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -22,6 +22,9 @@ public class ClientHandler implements Runnable {
|
||||||
out = new PrintWriter(client.getOutputStream(), true);
|
out = new PrintWriter(client.getOutputStream(), true);
|
||||||
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
|
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
|
||||||
|
|
||||||
|
// Send handshake / welcome
|
||||||
|
out.println("WELCOME");
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
// Command processing
|
// Command processing
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Tue Feb 10 14:16:42 CET 2026
|
#Tue Feb 10 14:45:41 CET 2026
|
||||||
artifactId=server
|
artifactId=server
|
||||||
groupId=com.lona.tictactoe
|
groupId=com.lona.tictactoe
|
||||||
version=1.0-SNAPSHOT
|
version=1.0-SNAPSHOT
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -33,6 +33,11 @@ function handleMessage(msg) {
|
||||||
const cmd = parts[0];
|
const cmd = parts[0];
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
case 'WELCOME':
|
||||||
|
log("Server Handshake received.");
|
||||||
|
statusDiv.textContent = 'Connected to Server';
|
||||||
|
statusDiv.style.color = '#10b981';
|
||||||
|
break;
|
||||||
case 'GAME_CREATED':
|
case 'GAME_CREATED':
|
||||||
currentCode = parts[1];
|
currentCode = parts[1];
|
||||||
mySymbol = 'X';
|
mySymbol = 'X';
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,11 @@ function handleMessage(msg) {
|
||||||
const cmd = parts[0];
|
const cmd = parts[0];
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
case 'WELCOME':
|
||||||
|
log("Server Handshake received.");
|
||||||
|
statusDiv.textContent = 'Connected to Server';
|
||||||
|
statusDiv.style.color = '#10b981';
|
||||||
|
break;
|
||||||
case 'GAME_CREATED':
|
case 'GAME_CREATED':
|
||||||
currentCode = parts[1];
|
currentCode = parts[1];
|
||||||
mySymbol = 'X';
|
mySymbol = 'X';
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue