replaced QuickFindUF with UF.java
added to Game class method which checks if move is legal