Let's build an advent Calendar for this Christmas!
Many Advent calendars for children take the form of a large rectangular card with numbered windows for each day of December starting from 1 ( although advent time begins on Advent Sunday, which is the fourth Sunday before Christmas day and often happens to be on November) and leading up to and including Christmas Eve (24) or in some cases Christmas day (25).
Windows are distributed across the calendar at a random position.
Every day children open the corresponding calendar window to reveal a small gift(usually a chocolate)
Task
The task is to display an advent calendar up to date following these rules:
- Include Christmas day : 1 to 25
- For days that have passed put an opened empty window
[ ]
( no different characters allowed ), so if i run the same code the next day there must be a new window opened. - At the current day put an opened window with a gift in it
[@]
( instead of@
you can use every printable character excep forspace
,[
,]
anddigits
). - For the remaining days put only the day number.
- At Christmas all the windows will be open, the next day they are all closed ( a new calendar ).
- Windows must open only on December, windows must stay closed on every month except for December.
- It should work the same way the next year, and every year, that is for example on December 2099 Windows start opening.
- Windows are laid down in random order on a 5 rows x 5 columns grid.
- The grid has not to be accurate, just consider that every windows must have at least one character space separating them on every side: left, top, right and bottom hence numbers must have left and right spaces of at least two characters.
Example
Today (15 December) :
23 21 [ ] 18 [ ] [ ] [ ] [ ] [ ] 16 24 22 [ ] 17 [ ] [ ] [ ] [ ] 25 19 [ ] [ ] [@] [ ] 20
Tomorrow (16 December) :
[ ] 17 25 [ ] [ ] [ ] 19 [ ] 18 21 [ ] 23 24 [ ] [ ] 22 [@] [ ] [ ] [ ] [ ] 20 [ ] [ ] [ ]
On every month different than December
18 23 21 12 19 25 24 3 15 14 16 9 17 20 4 8 2 11 5 7 6 13 10 22 1
All code-golf rules apply.