Skip to content

Instantly share code, notes, and snippets.

View mdakram28's full-sized avatar
💻
Coding and Hackathons

Akram Ansari mdakram28

💻
Coding and Hackathons
View GitHub Profile
public abstract class Player {
void playTurn(int pl,int turn){}
void playerInit(){}
void notifyWin(int pl){}
void notifyLose(int pl){}
}
import java.util.logging.Level;
import java.util.logging.Logger;
public class TicTacToe extends javax.swing.JFrame {
static int winComb[][] = {{1,2,3},{4,5,6},{7,8,9},{1,4,7},{2,5,8},{3,6,9},{1,5,9},{3,5,7}};
public static int[][] state = {{0,0,0},{0,0,0},{0,0,0}};
Player pl1 = new Human();
Player pl2 = new Computer("mind\\layer");