This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Player { | |
void playTurn(int pl,int turn){} | |
void playerInit(){} | |
void notifyWin(int pl){} | |
void notifyLose(int pl){} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
NewerOlder