blocks and battleship code