(DeviceSelection<Cards> type, int slot)
| 171 | } |
| 172 | |
| 173 | private void insertCard(DeviceSelection<Cards> type, int slot) { |
| 174 | if (getMemory().getCard(slot).isPresent()) { |
| 175 | if (type.getValue() != null && type.getValue().isInstance(getMemory().getCard(slot).get())) { |
| 176 | return; |
| 177 | } |
| 178 | getMemory().removeCard(slot); |
| 179 | } |
| 180 | if (type != null && type.getValue() != null) { |
| 181 | Card card = type.getValue().create(); |
| 182 | getMemory().addCard(card, slot); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | private RAM128k.RamCards getDesiredMemoryConfiguration() { |
| 187 | if (ramCard.getValue() == null) { |
no test coverage detected