Boot GRUB to entry not booted to last time?

I’m not sure I’d actually do this, but is there a way to make GRUB automatically select the boot option I didn’t use last boot?
i. e. If I booted into Windows last boot, it selects Ubuntu. If I booted into Ubuntu, it selects Windows.
I was just wondering because I often find myself rebooting to switch OSes, as I have different games that I run on each (though with my new rig I don’t need to run stuff on Ubuntu just for lower OS resource usage), and I was wondering if I could make it so that every time I pressed “restart” from either OS I wouldn’t have to change selections.
In practice this would also affect non-restart startups, so then I might have to boot twice to get the OS I was using last time.