A simple plaything for a 19 month old and higher.

This thread today reminded me of it:
https://www.unix.com/shell-programming-and-scripting/279465-larger-window.html\#post303021017
This is OSX 10.13.6 and greater centric only.
This expands the terminal window on the fly in bash.
You initially need to put the standard terminal window to the top left hand side as far as it goes.
I wrote this for my 19 month old grandson, (17-06-2018), as he loves punching the computer keyboard.
It is a simple keyboard plaything that prints a coloured squared in a random position inside an expanded terminal window. The window size is for a MBP 13 inch device so that is the reason for the odd terminal size.
If the first argument is set to [Yy] then a single alpha-numeric character is spoken so little one can learn said characters as well as printing the random coloured square. If the second argument is set to [Yy] then you can write a sentance of not more than 40 characters to aid in speech learning also with the random coloured square.
If there are no arguments then just the random coloured square is generated per keystroke.

#!/bin/bash
# Usage: Baby_Play [sppech<Yy>] [word<Yy>]<CR>
# Examples:
# Baby_Play<CR>
# Baby_Play Y y<CR>
#
# For OSX Sierra and above.
# Place default terminal in upper left hand corner.
# Auto expand to maximum size with dock and top bar showing.
printf "%b" "\x1B[8;48;179t"
# Write into terminal header...
printf "%b" "\x1B]0;Baby_Play, press the Delete or Esc, (and Enter), keys to QUIT.\x07"
clear
echo ""
echo "Usage: Baby_Play [speech<Yy>] [word<Yy>]<CR>"
echo ""
echo 'Press the Delete or Esc, (and Enter), keys at any time to QUIT Baby_Play...'
printf "\nPress ENTER/RETURN to continue:- "
read -r -n 1 char
clear
char="Baby_Play_Original_(C)2017,_B.Walker_Licence_CC0."
speech="$1"
word="$2"
colour=$(( ( $RANDOM % 8 ) + 40 ))
x=$(( $RANDOM % 174 ))
y=$(( $RANDOM % 43 ))
escape=$'\x1B'
backspace=$'\x7F'
# Thanks to Corona688 for the stty section below.
inkey() { char="" ; stty -icanon min 0 time 1 ; char=$( dd count=1 2> /dev/null ) ; }
printf "%b" "\x1B["$(( $y + 2 ))";"$(( $x + 3 ))"f\x1B[0;"$colour"m  \x1B[0m"
while true
do
	printf "%b" "\x1B[1;1f\x1B[0m "
	if [ "$word" = "Y" ] || [ "$word" = "y" ]
	then
		printf "Enter word(s), 40 characters maximum:- "
		read -r -n 40 char
	else
		inkey
	fi
	case $char in
		[''${escape}${backspace}])
			break
		;;
		" "|*[0-9a-zA-Z]*)
			colour=$(( ( $RANDOM % 8 ) + 40 ))
			x=$(( $RANDOM % 174 ))
			y=$(( $RANDOM % 43 ))
			if [ "$speech" = "Y" ] || [ "$speech" = "y" ]
			then
				say -v Daniel "$char"
			fi
			printf "%b" "\x1B["$(( $y + 2 ))";"$(( $x + 3 ))"f\x1B[0;"$colour"m  \x1B[0m"
			printf "%b" "\x1B[1;1f\x1B[0m                                                                                "
		;;
	esac
done
# EXIT comes here.
printf "%b" "\x1B[8;24;80t\x1Bc\x1B[2J\x1B[H\x1B[0m"
printf "%b" "\x1B]0;\x07"
clear
echo "Terminal reset back to original state."
exit 0

Have fun little ones.