Skip to content
Snippets Groups Projects
Select Git revision
  • 5215c6488f032ba21315012516b3886e030a9b2d
  • main default protected
  • variant
3 results

FirefighterGrid.java

Blame
  • Forked from LABOUREL Arnaud / Firefighter template
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Loot.java 485 B
    public class Loot {
        private int weight, value;
        private final float ratio;
    
        public Loot(int weight, int value) {
            this.weight = weight;
            this.value = value;
            this.ratio = (float) value/weight;
        }
    
        public String toString(){
            return weight+" "+value+" "+ratio;
        }
    
        public float getRatio(){
            return ratio;
        }
    
        public int getWeight(){
            return weight;
        }
    
        public int getValue(){
            return value;
        }
    }