When the player has no legal moves (there are no empty spaces and no adjacent tiles with the same value), the game ends.
Saat pemain tidak bisa bergerak lagi (tidak ada ruang kosong dan kotak bernomor sama di sekitarnya), permainan berakhir.