阅读背景:

该方法不会在方法中显示

来源:互联网 

I created a class like this

我创建了一个这样的类

public Move(char colour, int number) //a constructor takes 2 input
{
    this.colour = colour;            
    this.number = number;            
}

public static int convertColourtoNum(char colour)    
{
    int index = 0;
    if (colour == 'R')
        index = '0';
    else if (colour == 'Y')
        index = '1';
    else if (colour == 'G')
        index = '2';
    else 
        index = '3';
    return index;   //return the colour in type int after being converted

}
publ



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: