完了済

This commit is contained in:
2026-10-14 12:29:17 +09:00
parent 8c3324660c
commit 548d5421b8
17 changed files with 275 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
public class Car {
String color;
int gasoline;
public int run() {
this.gasoline--;
if (this.gasoline>=0) {
return (int)(Math.random()*15+1) ;
} else {
return -1;
}
}
}