This is a window:
---
| |
---
Let's add some walls |
. Put two spaces on either side of it so that the window has plenty of room.
| --- |
| | | |
| --- |
Now let's add a roof and a ceiling. To keep the window in the middle of the room, let's add one more row above it and below it.
---------
| |
| --- |
| | | |
| --- |
| |
---------
Now, just add a roof. Put a slash as far left as possible, and a backslash as far right as possible, and we have this:
/ \
---------
| |
| --- |
| | | |
| --- |
| |
---------
Then move the slash up one and right one. Move the backslash up one and left one:
/ \
/ \
---------
| |
| --- |
| | | |
| --- |
| |
---------
Repeat until the two slashes meet, then add an asterisk where they meet:
*
/ \
/ \
/ \
/ \
---------
| |
| --- |
| | | |
| --- |
| |
---------
And you're done! This is a 1x1 house. a 2x2 house would look like this:
*
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
-----------------
| | |
| --- | --- |
| | | | | | |
| --- | --- |
| | |
|-------|-------|
| | |
| --- | --- |
| | | | | | |
| --- | --- |
| | |
-----------------
and a 3x2 house:
*
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
-------------------------
| | | |
| --- | --- | --- |
| | | | | | | | | |
| --- | --- | --- |
| | | |
|-------|-------|-------|
| | | |
| --- | --- | --- |
| | | | | | | | | |
| --- | --- | --- |
| | | |
-------------------------
The challenge
You must write a full program that takes two integers, x and y, and prints a house that is X rooms wide and Y rooms tall. Your program should be able to handle houses up to 10x10. IO can be in any reasonable format. Trailing spaces on each line are allowed, and one trailing newline is allowed.
Shortest answer in bytes wins.