Quote:
Originally Posted by nadjatee1996
I know flash Action script, VB08, use to know some PhP, and Java+JavaScript, still remember some HTML. Photoshop CS4, some modelling program my sister use to let me play around with, Chinese,Mandarin,Spanish,English, hacking, computer tech, robotics, was learning C, hard facts about how a computer works, XP semi-pro, real life modeller, rendering, animations.I wouldn't have bugged you if you gave me nice instructions from the start.(Put the mobo in, plug it in, you done!->thats you)
|
if so then make a better site then andy and upload some screens of stuff you have done. and if you are in actuall programing then what dose
System.out.println();
do?
and tell me what is this "/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication17;
/*
*
* @author 20513
*/
import java.util.Scanner;
import java.lang.*;
public class Main {
/*
* @param args the command line arguments
*/
public static void tttborad1(String [][] tttborad){
for (int row = 1; row < tttborad[0].length -1; row++){
for (int col = 1; col < tttborad[0].length -1; col++){
System.out.print ("[" + tttborad[row][col] + "]" );
}
System.out.println();
}
}
public static void update_tttborad(String [][] update_tttborad){
for (int row = 1; row < update_tttborad[0].length -1; row++){
for (int col = 1; col < update_tttborad[0].length -1; col++){
System.out.print ("[" + update_tttborad[row][col] + "]" );
}
System.out.println();
}
}
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner (System.in);
int row, col, wolfgen, wolfgen1, again, rand1, rand2, num1, num2, total, sscan, xcount, againz, yesno;
String var1, var2, var3, var4, var5, var6, var7, var8, var;
againz = 0;
xcount = 0;
again = 0;
total = 0;
String [][] tttborad = new String [12][12];
String [][] update_tttborad = new String [12][12];
for (int r = 0; r < tttborad.length; r++){
for (int c = 0; c < tttborad[0].length; c++){
tttborad[r][c]= " ";
System.out.print ("[" + tttborad[r][c] + "]");
}
System.out.println();
}
for (int m = 0; m < update_tttborad.length; m++){
for (int n = 0; n < update_tttborad[0].length; n++){
update_tttborad[m][n]= " ";
System.out.print ("[" + update_tttborad[m][n] + "]");
}
System.out.println();
}
System.out.println(" ");
do
{
rand1 = ((int)((10 - 1 + 1)* Math.random() + 1));
rand2 = ((int)((10 - 1 + 1)* Math.random() + 1));
row = rand1;
col = rand2;
if (tttborad[row][col] == " ")
{tttborad[row][col] = "x";}
again = again + 1;
num1 = 1;
num2 = 1;
}while (again < 30);
sscan = 0;
tttborad1(tttborad);
System.out.println("");
do
{
for (int b = 1; b < tttborad.length - 1; b++){
for (int e = 1; e < tttborad[0].length - 1; e++){
num1 = b;
num2 = e;
total = 0;
var1 = tttborad[num1 - 1][num2 - 1];
var2 = tttborad[num1 - 1][num2];
var3 = tttborad[num1 - 1][num2 + 1];
var4 = tttborad[num1][num2 - 1];
var5 = tttborad[num1][num2 + 1];
var6 = tttborad[num1 + 1][num2 - 1];
var7 = tttborad[num1 + 1][num2];
var8 = tttborad[num1 + 1][num2 + 1];
if (var1 == "x")
{total = total + 1;}
if (var2 == "x")
{total = total + 1;}
if (var3 == "x")
{total = total + 1;}
if (var4 == "x")
{total = total + 1;}
if (var5 == "x")
{total = total + 1;}
if (var6 == "x")
{total = total + 1;}
if (var7 == "x")
{total = total + 1;}
if (var8 == "x")
{total = total + 1;}
if (total >= 4 || total <= 1)
{update_tttborad[num1][num2] = " ";}
else if (tttborad[num1][num2] == " " && total == 3 )
{update_tttborad[num1][num2] = "x";}
else if (tttborad[num1][num2] == "x" && total == 2 || total == 3)
//if (total >= 3 && total <= 3)
{update_tttborad[num1][num2] = "x";
xcount = xcount + 1;}
}
}
tttborad1(update_tttborad);
for (int v = 1; v < tttborad.length - 1; v++){
for (int w = 1; w < tttborad[0].length - 1; w++){
tttborad[v][w] = update_tttborad[v][w];
}
}
System.out.println(xcount);
xcount = 0;
System.out.println("Would you like to run again? yes = 0 no = 1");
yesno = input.nextInt();
if (yesno == 0)
{againz = 0;}
if (yesno == 1)
{againz = 1;}
}while (againz == 0);
}
}
" program is copyright by me