۱۳۹۴/۱۲/۲۰, ۰۲:۰۹ ب.ظ
سلام یه مشکلی پیش اومد وقتی داشتم کد میزدم اگه میشه راهنمایی کنید!
ارور های زیر رو دریافت میکنم
Multiple markers at this line
- This method requires a body instead of a
semicolon
- Duplicate method setcolors() in type
GameView
- Return type for the method is missing
----------------------------------
اینم دومی
Multiple markers at this line
- This method requires a body instead of a
semicolon
- Duplicate method setcolors() in type
GameView
- Return type for the method is missing
ارور های زیر رو دریافت میکنم
Multiple markers at this line
- This method requires a body instead of a
semicolon
- Duplicate method setcolors() in type
GameView
- Return type for the method is missing
----------------------------------
اینم دومی
Multiple markers at this line
- This method requires a body instead of a
semicolon
- Duplicate method setcolors() in type
GameView
- Return type for the method is missing
این هم کد هام (ارور ها مربوط به خط یک و دو هست)
setcolors();
private void setcolors(){
for (int x = 0; x < 4; x++) {
for (int y = 0; y < 4; y++) {
int count = cardsMap[x][y].getNum();
switch(count){
case 2 :
cardsMap[x][y].setBackgroundResource(R.color.red);
break;
case 4 :
break;
case 8 :
break;
case 16 :
break;
case 32 :
break;
case 64 :
break;
case 128 :
break;
case 256 :
break;
case 512 :
break;
case 1024 :
break;
case 2048 :
break;
case 4096 :
break;
case 8192 :
break;
case 16384 :
break;
default :
}
}
}}