Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OnStart(){
- Money = 0;
- I[0].SetPrice(20);
- I[0].SetEarn(3);
- I[0].SetOwn(true);
- for(int i = 1;i < 6;i++){
- I[i].SetPrice(3 * I[i - 1].GetPrice());
- I[i].SetOwn(false);
- I[i].SetEarn(I[i-1].GetEarn() * 1.02);
- }
- }
- public void FiveMil(View v){
- Money = 5000000;
- txt.setText(String.valueOf(Money));
- }
- }
- class Item{
- double price,earn;
- int amount;
- boolean own;
- public void SetPrice(double a){
- this.price = a;
- }
- public double GetPrice(){
- return this.price;
- }
- public void SetEarn(double a){
- this.earn = a;
- }
- public double GetEarn(){
- return this.earn;
- }
- public void SetOwn (boolean a){
- this.own = a;
- }
- public boolean GetOwn(){
- return this.own;
- }
- public void IncAmount(){
- this.amount++;
- }
- public int GetAmount(){
- return this.amount;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement