X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=new2%2Frogue_chat_nocanvas_monochrome.html;h=df29814dc9fe87b926092c48e75e76c70f3dda53;hb=b28833357c0b67e6146e0ac568f5cfd6696f08cd;hp=97c0f0879d8176baacf145a454b3fa6cb1b6b31c;hpb=61c63e6df3cc5bbd22fdbf3036481ade88112ca4;p=plomrogue2-experiments
diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index 97c0f08..df29814 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -44,12 +44,15 @@ let terminal = {
drawBox: function(start_y, start_x, height, width) {
let end_y = start_y + height;
let end_x = start_x + width;
- for (let y = start_y, x = start_x; y < end_y; x++) {
- this.content[y][x] = ' ';
+ for (let y = start_y, x = start_x;; x++) {
if (x == end_x) {
- x = start_x - 1;
- y += 1;
- }
+ x = start_x;
+ y += 1;
+ if (y == end_y) {
+ break;
+ }
+ };
+ this.content[y][x] = ' ';
}
},
}