Properly simulating a NAND gate? (I'm building a computer in my computer)
The best way is to implement an event wheel and define a propagation delay for the gate. Without this delay it is impossible to simulate any kind of memory element. You can look up the term "event wheel" in google, it is the basis for HDL simulators. Alternatively you can write the whole thing in verilog which has the advantage of actually realising the hardware later with the right tools and the simulator can be free (look up "Icarus").

If you really want to apply voltages you will have to implement a transistor model or use BSIM3 in some kind of custom simulator, but you will eventually have to reimplement SPICE since the object model you propose will not work well for circuits where "inputs" are actually wires connected to gates that can load the outputs and change the behaviour of the circuit.

Good luck.