public void TouchedByItem(Item item) {
        if (room == null) {
            room = item.room;
        }

        if (number == 0) {
            if (states[0] == 1) {
                states[0] = 2;
                for (int a = 1; a < 10; a++) {
                    states[a] = 1;
                }
                timeout = new Date(new Date().getTime() + 30000);
            }
        }
        else {
            boolean okay = true;
            if (states[0] < 2) {
                okay = false;
            }
            for (int a = 1; a < number; a++) {
                if (states[a] != 2) {
                    okay = false;
                }
            }
            if (okay) {
                states[number] = 2;
                timeout = new Date(new Date().getTime() + 5000);
            }
        }
    }