-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWordSearch.java
58 lines (36 loc) · 1.12 KB
/
WordSearch.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* Author: Aleksandr Zheleznov
* description: This is my final project for comp 1030
* This project can create a word search puzzle of any size with any number of words in it
* Date: nov 19,2021
* Time: 13:30
*/
import java.util.Random;
public class WordSearch {
/* seed first 2 numbers of the seed are size
* Third number is words to put in
* then next two do not serve a purpose as of yet
*/
private int seed;
Random random = new Random();
public WordSearch(){
seed = random.nextInt(100101,141212);
}
//Not used as of this example, serves as an overloaded method if user were
// to add their own seed
public WordSearch(int userSeed){
seed = userSeed;
}
public WordSearch(String seed){}
//create grid method
public String createGrid(){
CreateWordSearch ws = new CreateWordSearch();
return ws.createWordSearch(seed);
}
public int getSeed() {
return seed;
}
public void setSeed(int seed) {
this.seed = seed;
}
}