Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Aid ( 16 years ago )
import java.util.Random;

class LinesField
{
 private int[][] data=new int[8][8];//field with bouls
 private int score=0;//game score
 
 //create fields
 LinesField()
 {
  //add 3 bouls
  addBouls(3);
 }
 
 public int[][] getField()
 {
  return(this.data);
 }
 
 public int getScore()
 {
  return(this.score);
 }
 
 public void addBouls(int n)
 {
  Random r=new Random();
  for(int i=1; i<=n; i++)
   this.data[r.nextInt(8)][r.nextInt(8)]=r.nextInt(7);
 }
}

class FreeLines
{
 public static void main(String[] args)
 {
  
 }
}

 

Revise this Paste

Your Name: Code Language: