public boolean noMoves() { T048 copy = new T048(); for (int r = 0; r < _board.size(); r++) { for (int c = 0; c < _board.size(); c++) { copy._board.set(r, c, _board.get(r, c)); } } return !(copy.swipeU() || copy.swipeD() || copy.swipeL() || copy.swipeR()); }
/*==================================== plays an entire game of 2048, from STATIC therefore will be called as T048.play() ====================================*/ public static int play() { T048 t = new T048(); return t.playGame(); }