Advertisement
Guest User

chokokockocohkockokhockokjhocxko

a guest
Mar 18th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. public void OnStart(){
  2.  
  3. Money = 0;
  4. I[0].SetPrice(20);
  5. I[0].SetEarn(3);
  6. I[0].SetOwn(true);
  7. for(int i = 1;i < 6;i++){
  8. I[i].SetPrice(3 * I[i - 1].GetPrice());
  9. I[i].SetOwn(false);
  10. I[i].SetEarn(I[i-1].GetEarn() * 1.02);
  11. }
  12. }
  13. public void FiveMil(View v){
  14. Money = 5000000;
  15. txt.setText(String.valueOf(Money));
  16. }
  17.  
  18. }
  19.  
  20.  
  21. class Item{
  22. double price,earn;
  23. int amount;
  24. boolean own;
  25. public void SetPrice(double a){
  26. this.price = a;
  27. }
  28. public double GetPrice(){
  29. return this.price;
  30. }
  31. public void SetEarn(double a){
  32. this.earn = a;
  33. }
  34. public double GetEarn(){
  35. return this.earn;
  36. }
  37. public void SetOwn (boolean a){
  38. this.own = a;
  39. }
  40. public boolean GetOwn(){
  41. return this.own;
  42. }
  43. public void IncAmount(){
  44. this.amount++;
  45. }
  46. public int GetAmount(){
  47. return this.amount;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement