this.switch_mode('play');
},
enter_ascii_art: function(command) {
- if (this.inputEl.value.length != 6) {
- this.log_msg('? wrong input length, must be 6; try again');
+ if (this.inputEl.value.length > 6) {
+ this.log_msg('? wrong input length, must be max 6; try again');
return;
+ } else if (this.inputEl.value.length < 6) {
+ while (this.inputEl.value.length < 6) {
+ this.inputEl.value += ' ';
+ }
}
this.log_msg(' ' + this.inputEl.value);
this.full_ascii_draw += this.inputEl.value;
self.switch_mode('play')
def enter_ascii_art(command):
- if len(self.input_) != 6:
- self.log_msg('? wrong input length, must be 6; try again')
+ if len(self.input_) > 6:
+ self.log_msg('? wrong input length, must be max 6; try again')
return
+ if len(self.input_) < 6:
+ self.input_ += ' ' * (6 - len(self.input_))
self.log_msg(' ' + self.input_)
self.full_ascii_draw += self.input_
self.ascii_draw_stage += 1