JAVA入门的简易版连连看

import java.util.Random;
import java.util.Scanner;
public class LLK{
	public static void main(String [] args){
		Scanner sc=new Scanner(System.in);
		Random r=new Random();

		System.out.println("***************************************************");
		System.out.println("\t\t连连看简化版");
		System.out.println("\t\t版权所有:PXY");
		System.out.println("***************************************************");
	
		System.out.println("请输入行:");
		int x=sc.nextInt()+2;
		int y=0;
		if(x%2==0){
			System.out.println("请输入列:");
			y=sc.nextInt()+2;
		}else{
			do{
				System.out.println("请输入列(必须是偶数):");
				y=sc.nextInt()+2;
			}while(y%2==0);
		}
	
	//赋值
	int[][] qp=new int [x][y];
	for(int i=1;iy2?y2:y1;
			max=y1>y2?y1:y2;
			 for(int i=min+1;ix2?x2:x1;
			max=x1>x2?x1:x2;
			 for(int i=min+1;i

你可能感兴趣的:(JAVA入门)