Simple javascript console game