10 minute Tic Tac Toe
When it is X’s turn, and they make a move, only player X can win.  Similarly, only Y can win on Y’s turn.  So why all these tests?

win = tt[0].value == 1 ? "X" : "O";


If there is a winner, just test p1turn in the if (winner) { code!

String win = p1turn ? "X" : "O";


Okay, you may want to move p1turn = !p1turn; to the end of the function, first, to avoid X/O confusion.



This code is checking if the row has all the same symbols, and the symbol is not blank:

if (tt[0].value == tt[1].value &amp;&amp; tt[0].value == tt[2].value &amp;&amp; tt[0].value != -1) {


When the player moves, this.value is set to their code.  And only they can win on this move.  So we could instead write:

if (tt[0].value == value &amp;&amp; tt[1].value == value &amp;&amp; tt[2].value == value) {


Slightly shorter.  But we can do better.

Change X’s &amp; O’s values to +1 and -1.  Use 0 for blank.  Then, if a row sums to +3 or -3, you have a winner!

if (tt[0].value + tt[1].value + tt[2].value == 3*value) {


Similarly for other winning directions.