SHARE
TWEET

Untitled

a guest Jun 20th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.kodilla.sudoku;
  2.  
  3. import java.util.*;
  4.  
  5. public class SudokuElement {
  6.  
  7.     public static final int Empty = -1;
  8.     public int value = Empty;
  9.     public List<Integer> possibleElementsList = createPossibleElementsList();
  10.  
  11.     public SudokuElement() {
  12.     }
  13.  
  14.     public List<Integer> createPossibleElementsList() {
  15.        List<Integer> newElementList = new ArrayList<>();
  16.         for (int i = 1; i <= 9; i++) {
  17.             newElementList.add(value+i+1);
  18.         }
  19.         System.out.println(newElementList);
  20.         return  newElementList;
  21.     }
  22.  
  23.     public int getValue() {
  24.         return value;
  25.     }
  26.  
  27.     public void setValue(int value) {
  28.         this.value = value;
  29.     }
  30.  
  31.     public List<Integer> getPossibleElementsList() {
  32.         return possibleElementsList;
  33.     }
  34.  
  35.     public void setPossibleElementsList(List<Integer> possibleElementsList) {
  36.         this.possibleElementsList = possibleElementsList;
  37.     }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top