View bash_commands.sh
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
# This is a comment | |
# 1. Print Directory Content | |
ls | |
# 2. Enter a Directory | |
cd <Directory> | |
# 3. Exit The current directory | |
cd .. | |
# 4. Crate a file | |
touch <filename> |
View hello_world.c
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
#include <stdio.h> | |
int main() { | |
printf("Hello World\n"); | |
return 0; | |
} |
View ether
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
0x999Ac312D598Ab0Ac4C09463a6faf5C21A4A47Ec |
View ex3.java
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 void playNext1(){ | |
ArrayList<Node> temp = new ArrayList<Node>(); | |
//System.out.println(id+" : "+sub_nodes.size()); | |
long max = sub_nodes.get(0).pref; | |
for(int i=0;i<sub_nodes.size();i++) | |
{ | |
if(sub_nodes.get(i).pref > max) | |
{ | |
temp.clear(); | |
temp.add(sub_nodes.get(i)); |
View ex2.java
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
for(int i=0;i<9;i++) | |
{ | |
layerFiles[i] = new File(l+(i+1)+".nodes"); | |
if(!layerFiles[i].exists()) | |
{ | |
try{ | |
layerFiles[i].createNewFile(); | |
} | |
catch(Exception e) | |
{ |
View ex1.java
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
void playTurn(int pl,int turn){ | |
while(TicTacToe.butClicked == 0); | |
switch(TicTacToe.butClicked) | |
{ | |
case 1 : TicTacToe.state[0][0]=pl;break; | |
case 2 : TicTacToe.state[0][1]=pl;break; | |
case 3 : TicTacToe.state[0][2]=pl;break; | |
case 4 : TicTacToe.state[1][0]=pl;break; | |
case 5 : TicTacToe.state[1][1]=pl;break; | |
case 6 : TicTacToe.state[1][2]=pl;break; |
View Layer.java
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.ArrayList; | |
public class Layer { | |
ArrayList<Node> nodes = new ArrayList<Node>(); | |
int layerNum = 0; | |
public Layer(int Num){ | |
layerNum = Num; | |
} | |
View Node.java
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.ArrayList; | |
public class Node { | |
ArrayList<Node> sub_nodes = new ArrayList<Node>(); | |
String subNodes=""; | |
String id=""; | |
int pref = 0; | |
int n=0; |
View Computer.java
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.io.*; | |
import java.util.ArrayList; | |
public class Computer extends Player { | |
int t=0; | |
Node begin = new Node("000000000",0,this); | |
Node current = begin; | |
View Human.java
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 class Human extends Player { | |
@Override | |
void playTurn(int pl,int turn){ | |
while(TicTacToe.butClicked == 0); | |
switch(TicTacToe.butClicked) | |
{ | |
case 1 : TicTacToe.state[0][0]=pl;break; | |
case 2 : TicTacToe.state[0][1]=pl;break; | |
case 3 : TicTacToe.state[0][2]=pl;break; |
NewerOlder