but you see, this one is "on a mobile device"!
I believe the fact that Nintendo was the first to file a patent on this method of operation will yield them a patent concession, wrong as that might be in the spirit of the original patent system (protect innovators and encourage technological development.)
edit Comments below touch on the "first-to-file" changes and may provide more accurate analysis of the situation. I ignore corporate IP so I'm probably not the best person to rely upon.
Wouldn't the earlier work performed by company 2 be prior art, and be used to invalidate company 1's patent? In that event, what is the value of a first-to-file system, if a competing inventor can use their earlier invention as prior art? And if a competing inventor can't use their evidence of earlier invention as prior art, why not? Perhaps it's simplistic, but common sense would seem to dictate that for "first to file" to mean anything, prior art would have to be disregarded.
If company 2 had published their work, then it would count as prior art. The benefit of first-to-file is that there's no more expensive discovery to go through inventors' lab notebooks or other things to try to establish the definitive date when someone "invented" something. Instead, this gets reduced to checking a publication date, which should be a matter of public record. That reduces litigation costs. It also encourages people to publish their research. Both of those are good things.