aboutsummaryrefslogtreecommitdiff
path: root/comp2511/blackout/CloudStorageDevice.java
blob: 04e1c4107dc252b77e575855348507744b5f1751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package unsw.blackout;

import unsw.utils.Angle;

// "This device acts like a desktop"
// There is a small POTENTIAL issue where our satellites check the type of the device, and if our
// device is supposed to act like a desktop, then the satellites should also be able to communicate
// with our CloudStorageDevice if Desktops are compatible. This is unspecified!
public class CloudStorageDevice extends DesktopDevice {
    public CloudStorageDevice(String deviceID, Angle position) {
        super(deviceID, position);
    }

    @ Override
    final protected int getNumBytesInFiles() {
        int count = 0;
        for (File file : getReceivedFiles()) {
            count += file.getContents().length();
        }
        return count;
    }
}