Posts

Showing posts from February, 2016

Join to OOP_IF group

Salam, Hi Students., here is I share the link to join on OOP_IF  group OOP_IF link
Well, here is the sample of TicTac game developed in Java, Ok, try to develop in C++. import java.awt.*; import java.awt.event.*; import javax.swing.*; public class TicTac2 implements ActionListener {     private int[][] winCombinations = new int[][] { { 0, 1, 2 }, { 3, 4, 5 },{ 6, 7, 8 },             { 0, 3, 6 },{ 1, 4, 7 }, { 2, 5, 8 },{ 0, 4, 8 }, { 2, 4, 6 }};     private JFrame window = new JFrame("Catur Jawa");     private JButton buttons[] = new JButton[9];     private int count = 0;     private String letter = "";     private boolean win = false;     private static int startCount = 0;     JMenuBar menu = new JMenuBar();     JMenuItem newGame = new JMenuItem("New Game"), instr = new JMenuItem(             "Instructions"), exit = new JMenuItem("Exit"),             name = new JMenuItem("Change Name");     static String x = "X";     static String y = "Y";     public TicTac2() { //bangun windows