created basic simulator
This commit is contained in:
parent
8c02a9e950
commit
5a06b2bc0b
12 changed files with 541 additions and 0 deletions
13
ass2/InputDevice.cpp
Normal file
13
ass2/InputDevice.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include "InputDevice.h"
|
||||
|
||||
InputDevice::InputDevice(std::istream& in) : input(in) {
|
||||
}
|
||||
|
||||
uint8_t InputDevice::read() {
|
||||
char c;
|
||||
if (input.get(c)) {
|
||||
uint8_t result = (uint8_t)c;
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue