-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting.java
51 lines (46 loc) · 1.7 KB
/
testing.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
//testing certain scenarios for clarity
import java.util.ArrayList;
import java.util.Arrays;
public class testing {
public static void main(String[] args) {
// Game gameBoard = new Game();
// gameplay game = new gameplay();
//
// view.printGame(gameBoard);
// move move1 = new move("start", move.RIGHT, 7, 7);
// move1.isValid = true;
// gameBoard.placeWordOnBoard(move1);
// view.printGame(gameBoard);
//
// move move2 = new move("termite", move.DOWN, 7, 11);
// move2.isValid = true;
// gameBoard.placeWordOnBoard(move2);
// view.printGame(gameBoard);
//
// move move3 = new move("tar", move.RIGHT, 9,9);
// move3.isValid = true;
// gameBoard.placeWordOnBoard(move3);
// view.printGame(gameBoard);
//
// move move4 = new move("road", move.DOWN, 7,10);
// ArrayList<String> move4Test = game.getSecondaryWords(move4, gameBoard);
// System.out.println("new word: " +move4Test.size());
// System.out.println("word: " +move4Test.remove(0));
// System.out.println("word: " +move4Test.remove(0));
// move4.isValid = true;
// gameBoard.placeWordOnBoard(move4);
// view.printGame(gameBoard);
// System.out.println("total moves: " + move.totalNumberOfMoves);
String[] testStr = new String[5];
testStr[0] = "A";
testStr[1] = "B";
testStr[2] = "C";
testStr[3] = "D";
testStr[4] = "E";
String word = "ABBACD";
System.out.println(String.valueOf(word.charAt(5)));
//word
int pos = Arrays.binarySearch(testStr, String.valueOf(word.charAt(5)));
System.out.println("pos: " + pos);
}
}